🎴 Flashcard Mode

Programs in C

Card1 / 15
Mastered0
Review0
QuestionClick to flip

<stdio.h>void main() { printf("%d"t, sizeof(7.5)); printf("%d"t, sizeof(80000)); printf("%d"t, sizeof('B')); }.
</stdio.h>
Which of the following is the output of the program?

AnswerClick to flip back
A
8, 4, 2
💡 Explanation:

Sizeof operator is used to provide size of the given variable. Here, sizeof(7.5) provides the size 8 byte because it is a double type. Sizeof(80000) provides the size 4 byte because it is long int type. Sizeof ('B') provides the size 2 byte because it is a character type.

Change Mode