Online GK Series

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

Q.

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

Computer Science Books

Your Valuable Comments Please...

Please Like Us
Brand