Online GK Series

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

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

Computer Science Books

Your Valuable Comments Please...

Please Like Us
Brand