Examveda
Examveda

What will be the output of the following C code?
#include <stdio.h>
int main()
{
    int a[4] = {1, 2, 3, 4};
    int b[4] = {1, 2, 3, 4};
    int n = &b[3] - &a[2];
    printf("%d\n", n);
}

A. -3

B. 5

C. 4

D. Compile time error

Answer: Option A


This Question Belongs to C Program >> Pointer

Join The Discussion

Related Questions on Pointer