What is the output of the below program and how it is?
void main()
{
static int var=5;
printf("%d",var--);
if(var)
main();
}
Answer Posted / thiyagu
since the value of var is declared as static
the output will be 4 for each time printf is called by
recursive method main().
| Is This Answer Correct ? | 5 Yes | 19 No |
Post New Answer View All Answers
Explain what are multidimensional arrays?
Explain what are the __date__ and __time__ preprocessor commands?
What is an lvalue?
Under what circumstances does a name clash occur?
What is the difference between variable declaration and variable definition in c?
Why enum is used in c?
What is difference between arrays and pointers?
Are the expressions * ptr ++ and ++ * ptr same?
What is character constants?
What is d'n in c?
write a c program for swapping two strings using pointer
What is c mainly used for?
What is output redirection?
Is printf a keyword?
A collection of functions,calls,subroutines or other data a) library b) header files c) set of files d) textfiles