Examveda
Examveda

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

A. 1

B. Compile time error

C. Undefined behaviour

D. 2

Answer: Option B


This Question Belongs to C Program >> Pointer

Join The Discussion

Related Questions on Pointer