Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - What does void printBinary(int num) mean?
What does void printBinary(int num) mean?

printBinary prints binary numbers

int num input parameter is an integer number num

void printBinary(int num); // Function prototype declaration, function The name printBinary is an input parameter and has no return value.

void printBinary(int num){. . . . }

Function definition, the input parameter is an integer, converted into binary character form, and printed out.

Function call:

printBinary(789); //The input parameter is the decimal number 789, convert it to binary and print it out

printBinary(0xf8) ; // The input parameter is the hexadecimal number f8, convert it to binary and print it out

printBinary(067); // The input parameter is the octal number 67, convert it to binary and print it out Print it out