Join our Telegram Channel

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

DOWNLOAD CURRENT AFFAIRS PDF FROM APP

Today's Top Current Affairs

Current Affairs MCQs

State-wise Current Affairs

General Knowledge

Month-wise Current Affairs 2023

Category-wise Current Affairs

Jobs by Qualification

Free Mock Test