Home / CSE MCQs / C-MCQs :: Discussion

Discussion :: C-MCQs

  1. What is the output of the below code considering size of short int is 2, char is 1 and int is 4 bytes?

        int main()
        {
            short int i = 20;
            char c = 97;
            printf("%d, %d, %d\n", sizeof(i), sizeof(c), sizeof(c + i));
            return 0;
        }
  2. A.
    2, 1, 2
    B.
    2, 1, 1
    C.
    2, 1, 4
    D.
    2, 2, 8

    View Answer

    Workspace

    Answer : Option C

    Explanation :

    None.


Be The First To Comment