MCQs > IT & Programming > Programming With C > 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); }

Programming With C 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

Programming With C Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

Programming With C Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it