Home » C Programming » Pointers » Question
  1. What will be the output of the following C code?
    #include <stdio.h>
    int main()
    {
    int array1[5] = {10, 20, 30, 40, 50};
    int array2[5] = {11, 21, 31, 41, 51};
    int R = &array2[3] - &array1[2];
    printf("%d\n", R);
    }
    1. -7
    2. Compilation Error
    3. Garbage value
    4. 50
    5. None of these
Correct Option: A

-7



Your comments will be displayed only after manual approval.