Home » C Programming » Data Types » Question
  1. What will be the output of the following C code considering the size of short int is 2, char is 1 and int is 4 bytes?
    #include <stdio.h>
    int main()
    {
    short int k = 23;
    char ch = 99;
    printf("%d, %d, %d\n", sizeof(k), sizeof(ch), sizeof(ch + k));
    return 0;
    }
    1. 23
    2. 99
    3. 2, 1, 4
    4. 4, 1, 2
    5. None of these
Correct Option: C

2, 1, 4



Your comments will be displayed only after manual approval.