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 / guest

0 1 2 5 10

Is This Answer Correct ?    23 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

using only #include and #include Write a program in C that will read an input from the user and print it back to the user if it is a palindrome. The string ends when it encounters a whitespace. The input string is at most 30 characters. Assume the string has no spaces and distinguish between and lowercase. So madam is a palindrome, but MadAm is not a palindrome. Use scanf and %s to read the string. Sample Test: Enter a string: madam madam is a palindrome. Enter a string: 09023 09023 is not a palindrome.

1302


Write a code on reverse string and its complexity.

593


Is fortran faster than c?

568


can we implement multi-threads in c.

653


What are structure members?

586






Write the test cases for checking a variable having value in range -10.0 to +10.0?

1808


What is sizeof array?

600


Tell me what is the purpose of 'register' keyword in c language?

605


What does a pointer variable always consist of?

653


What are the output(s) for the following ? #include char *f() {char *s=malloc(8); strcpy(s,"goodbye")} main() { char *f(); printf("%c",*f()='A'); }

688


how to construct a simulator keeping the logical boolean gates in c

1714


What is a list in c?

609


Which one would you prefer - a macro or a function?

590


Can I use base-2 constants (something like 0b101010)? Is there a printf format for binary?

569


What is boolean in c?

596