adplus-dvertising
frame-decoration

Question

What is the output of C Program with arrays?
int main()
{
    int ary[4];
    ary[4] = {1,2,3,4};
    printf("%d ", ary[2]);
    return 0;
}

a.

2

b.

3

c.

0

d.

Compiler error

Posted under C Programming

Answer: (d).Compiler error

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What is the output of C Program with arrays?