Home » C Programming » Pointers » Question
  1. What will be the output of the following C code?
    #include <stdio.h>
    int main()
    {
    int arr[5] = {61, 62, 63, 64, 65};
    void *p = &arr[1];
    void *p1 = &arr[5];
    int Res = 0;
    Res = p1 - p;
    printf("%d\n", Res);
    }
    1. Compilation Error
    2. Depends on the compiler
    3. 16
    4. Garbage value
    5. None of these
Correct Option: C

16



Your comments will be displayed only after manual approval.