C-Programming-data-structure || 2019 MCQ || 2-mark

Last Updated :
Discuss
Comments

Consider the following C function.

C
void convert (int n) {
if (n < 0)
printf ("%d", n);
else {
convert (n/2);
printf ("%d", n%2);
}
}


Which one of the following will happen when the function convert is called with any positive integer n as argument? GATE CSE || 2019 MCQ || 2-mark


 It will print the binary representation of n in the reverse order and terminate

It will not print anything and will not terminate

It will print the binary representation of n and terminate

 It will print the binary representation of n but will not terminate

Share your thoughts in the comments
Article Tags :