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
A c program to display count values from 0 to 100 and flash each digit for a secong.reset the counter after it reaches 100.use for loop,. pls guys hepl me.. :(
List the difference between a While & Do While loops?
How many types of functions are there in c?
What is the purpose of the preprocessor directive error?
How can I open a file so that other programs can update it at the same time?
Why is c not oop?
Explain the difference between ++u and u++?
Explain 'far' and 'near' pointers in c.
write a program to rearrange the array such way that all even elements should come first and next come odd
Is a house a mass structure?
What is include directive in c?
What is optimization in c?
What are the types of unary operators?
What is the behavioral difference when include header file in double quotes (“”) and angular braces (<>)?
void main(int n) { if(n==0) return; main(--n); printf("%d ",n); getch(); } how it work and what will be its output...............it any one know ans plz reply