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
What is the difference between text and binary modes?
In C programming, what command or code can be used to determine if a number of odd or even?
What is the correct code to have following output in c using nested for loop?
disply the following menu 1.Disply 2.Copy 3.Append; as per the menu do the file operations 4.Exit
What is the use of pragma in embedded c?
Where in memory are my variables stored?
Why are algorithms important in c program?
Why doesnt this code work?
What is a stream?
Write a program to swap two numbers without using third variable?
Write a program to check armstrong number in c?
a function gets called when the function name is followed by a a) semicolon (;) b) period(.) c) ! d) none of the above
What is the explanation for prototype function in c?
Can you write a programmer for FACTORIAL using recursion?
What are the 5 organizational structures?