JOIN ADRE 2.0 Telegram Group

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
APSC CCE PRELIMS Mock Test - 1 Start Test
APSC CCE PRELIMS Mock Test - 2 Start Test

DOWNLOAD CURRENT AFFAIRS PDF FROM APP

APSC PRELIMS FULL LENGTH MOCK TEST

Take Mock Tests

Government Schemes Mock Test Start Test!
Political Science Mock Test – 42 Start Test
History Test – 190 Start Test
Quantitative Aptitude Test Start Test!
Trigonometry - Mock Test Start Test!
Data Interpretation - Mock Test Start Test!
General Awareness - Mock Test Start Test!
Reasoning Ability - Mock Test Start Test!
Englist(Antonyms) Mock Test 1 Start Test!
Quantitative Aptitude (Percentage) Mock Test Start Test!
Economy Mock Test 1 Unlock Test!
Books & Authors - Test 2 Unlock Test!
apsc cce prelims 2024 test series
Advertisement