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
Write a Program to find whether the given number or string is palindrome.
What is a list in c?
what are the advantages of a macro over a function?
What is dynamic memory allocation?
What is the difference between fread and fwrite function?
What is the difference between malloc() and calloc()?
What is typeof in c?
What is the scope of global variable in c?
When is a null pointer used?
general for is %wd,f-d; in this system "w" means a) 'w' represent total width of digits b) 'w' represent width which includes the digits before,after decimal place and the decimal point c) 'w' represent width which includes the digits before only d) 'w' represent width after decimal place only
What is a global variable in c?
What do header files do?
how do you execute a c program in unix.
can we change the default calling convention in c if yes than how.........?
What happens if you free a pointer twice?