GkSeries.com

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]

DOWNLOAD CURRENT AFFAIRS PDF FROM APP

Please share this page

Click Here to Read more questions

Teacher Eligibility Test