Online GK Series

This site is dedicated to the aspirants of competitive exams SSC, UPSC, Railways, Postal Assistants, Bank, GATE and NET

Online MBA - FEE Rs. 7500 Only

Q.

What is the output of the following code?

	main()
	{
		static int num=8;
		printf("%d",num=num-2);
		if(num!=0)
		main();
	}
          
A 8 6 4 2
B Infinite output
C 6 4 2 0
D invalid because main function cannot call itself
Answer & Explanation
Option: [C]

mcq on c programming storage classes 04

Your Valuable Comments Please...

Useful Computer Science EBooks