Home » C Programming » Pointers » Question
  1. What will be the output of the following C code?
    #include <stdio.h>
    int main()
    {
    const int num[5] = {11, 21, 31, 41, 51};
    int *ptr;
    ptr = num + 3;
    *ptr = 50;
    printf("%d\n", num[3]);
    }
    1. 11
    2. 21
    3. 31
    4. 51
    5. 50
Correct Option: E

50



Your comments will be displayed only after manual approval.