What is the output of below code?
main()
{
static in a=5;
printf("%3d",a--);
if(a)
main();
}
Answer Posted / srinivas reddy m v
54321
here main() is called again in main function
this leads to recursion....
the function is called until a become 0.
value is retained as static key word is used.
not much clear about usage of "%3d"
| Is This Answer Correct ? | 10 Yes | 1 No |
Post New Answer View All Answers
a formula,a series of steps,or well defined set of rules for solving a problem a) algorithem b) program c) erdiagram d) compiler
How can you increase the size of a statically allocated array?
.main() { char *p = "hello world!"; p[0] = 'H'; printf("%s",p); }
What is a good data structure to use for storing lines of text?
What is a 'null pointer assignment' error?
write a c program for swapping two strings using pointer
Are the variables argc and argv are local to main?
What does c mean?
How can variables be characterized?
Why we not create function inside function.
Explain threaded binary trees?
How can you increase the size of a dynamically allocated array?
Explain what is the difference between text files and binary files?
i = 25;switch (i) {case 25: printf("The value is 25 ");case 30: printf("The value is 30 "); When the above statements are executed the output will be : a) The value is 25 b) The value is 30 c) The value is 25 The value is 30 d) none
how many types of operators are include in c language a) 4 b) 6 c) 8 d) 12