Sports GK Questions and Answers 2024 (Latest Updated)

Awards & Honours GK Questions 2024 (Latest Updated)

Question

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

Advertisement
Article and Schedule Quiz Start Test!
DOWNLOAD CURRENT AFFAIRS PDF FROM APP
Assam Direct Recruitment Test Series

Computer Science Topics