Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.
Recursion C program.
{
static int var = 5;
printf("%d ",var--);
if(var)
main();
}
Ans:5 4 3 2 1
Explanation:
When static storage class is given, it is initialized once. The change in the value of a static variable is retained even between the function calls. Main is also treated like any other ordinary function, which can be called recursively.
Profile Answers by Beena Questions by Beena
Questions by Beena answers by Beena
This Question is not yet answered!
Related Answered Questions
Related Open Questions