Online GK Series

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

Connect with Universities & Study Abroad Experts Instantly Connect Now

Q.

What will be the output of the following code?

	struct
	{
		int a;
		double d;
		float cp;
	}s;
	void main()
	{
		printf("%d\t%d\t%d\t%d", sizeof(s.a), sizeof(s.d), sizeof(s.cp), sizeof(s));
	}
	
A 4, 8, 4, 24
B 8, 2, 4, 12
C 10, 4, 6, 4
D 4, 8, 4, 14
Answer & Explanation
Option: [A]

mcq on c programming structures 05

Your Valuable Comments Please...

Useful Computer Science EBooks