Question: Write a function called show_bits( ). This function must have the following prototype: void show_bits(int); This function must print the bit pattern of the parameter
Write a function called show_bits( ). This function must have the following prototype:
void show_bits(int);
This function must print the bit pattern of the parameter of type int. Compile and test your program. Here are two test cases (data and expected results) to illustrate the behaviour of this function: Test Case 1: If the parameter (int) is 12345, then show_bits( ) prints:
00000000000000000011000000111001
Test Case 2: If the parameter (int) is -12345, then show_bits( ) prints:
11111111111111111100111111000111
language is C
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
