fun(int x)
{
if(x > 0)
fun(x/2);
printf("%d", x);
}

above function is called as:
fun(10);

what will it print?



}

Answer Posted / mortal

it will print "0" i.e zero since compiler wont get to the
print statement until the value is zero.

Is This Answer Correct ?    2 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Compare interpreters and compilers.

642


Write a program to print fibonacci series without using recursion?

612


Explain about block scope in c?

663


What is the value of c?

576


Write a code to generate a series where the next element is the sum of last k terms.

742






What is identifiers in c with examples?

680


explain what is fifo?

636


explain what is an endless loop?

615


What is wrong with this statement? Myname = 'robin';

828


What is the difference between the expression “++a” and “a++”?

652


Define macros.

787


Differentiate between full, complete & perfect binary trees.

675


How to get string length of given string in c?

611


C program execution always begins with a) #include b) comment (/*-------*/) c) main() d) declaration instructions

615


application areas a 'c' a) operating system b) graphics, interpreter, assembler c) program evalution, communication softwares d) all the above

610