MCQs > IT & Programming > C Programming > Following program, assuming that data type short takes 2 bytes for storage? struct node { unsigned char bit1 : 1; unsigned char bit2 : 1; unsigned short bit3 : 7; } node1; main() { int size = sizeof(node1); printf('%d', size); }

C Programming MCQs

What will be the output of the following program, assuming that data
type short takes 2 bytes for storage?
struct node
{
unsigned char bit1 : 1;
unsigned char bit2 : 1;
unsigned short bit3 : 7;
} node1;
main()
{
int size = sizeof(node1);
 
printf("%d", size);
}

Answer

Correct Answer: 2

Explanation:

Note: This Question is unanswered, help us to find answer for this one

C Programming Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

C Programming Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it