Write a function printbinary that displays the number of


Write a function printBinary() that displays the number of bits used VB2010. Using 'sizeof()' if the user enters and int 17 the function should display 000000000000000000000000000010001.
1- Initialize and unsigned int variable mask, with a value whose binary representation has a 1 followed by zeros.
2- For a counter running from 1 thru the number of bits
a. If the bitwise-and (&) of the given integer and mask is non zero: Display 1 Else Display 0
b. Shift the bits in mask one position to the right using >>.

Request for Solution File

Ask an Expert for Answer!!
Electrical Engineering: Write a function printbinary that displays the number of
Reference No:- TGS0620021

Expected delivery within 24 Hours