Sports GK Questions and Answers 2024 (Latest Updated)

Awards & Honours GK Questions 2024 (Latest Updated)

Question

What does the following function print?

	func(int i)
	{
		if(i%2) return 0;
		else return 1;
	}
	main()
	{
		int i=3;
		i=func(i);
		i=func(i);
		printf("%d", i);
	}
	
A 3
B 1
C 0
D 2
Answer & Explanation
Option: [B]

mcq on c programming functions 02

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

Random GK Questions

Assam Direct Recruitment Test Series

Computer Science Topics