C Programming Sizeof Multiple choice question

Exercise : - Multiple Choice Question On C Programming, MCQ C Programming Sizeof

This section contains a lot of c programming question and answer with explanation on the topic sizeof. These question and answer are very much helpful for interview(campus interviews, walkin interviews, company interviews), competitive examination ,entrance test and placements. Each question having answer and explanation that would help you to understand easily. These question are designed from basic to advance level. So anyone can learn from here (beginner, fresher, engineering graduate, an experienced IT professional).

All the question of c programming are listed below on sizeof along with detailed explanation / solution and answer.

1) What will be output when you will execute following c code in Linux GCC?

#include<stdio.h> int main(){ printf("%d\t",sizeof(9.9)); printf("%d\t",sizeof(9000)); printf("%d",sizeof('#')); return 0; }

A. 8 4 4
B. Compile error
C. 4 2 1
D. 4 4 2


8 4 4


( A )

Explanation :

note: previous declaration of main was here