Current Affairs Monthly Magazine -Subscribe Now!
900 GEOGRAPHY MCQS | EBook
1000 BIOLOGY MCQS AND ANSWERS | EBook
1000 POLITICAL SCIENCE MCQS | EBook
1000 ECONOMICS MCQS FOR EXAMS | EBook
Mughal Empire MCQs | EBook
ECONOMIC GEOGRAPHY MCQs | EBook
350 MCQs ON INDIAN CONSTITUTION | EBook
GENERAL AWARENESS COMBO (6 EBOOKS)

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

Month-wise Current Affairs 2022

Category-wise Current Affairs

Jobs by Qualification

Free Mock Test