Sports GK Questions and Answers 2024 (Latest Updated)

Awards & Honours GK Questions 2024 (Latest Updated)

Question

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

Advertisement
Article and Schedule Quiz Start Test!
DOWNLOAD CURRENT AFFAIRS PDF FROM APP

Random GK Questions

Assam Direct Recruitment Test Series

Computer Science Topics