adplus-dvertising
frame-decoration

Question

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

a.

0

b.

2

c.

Garbage value

d.

Compiler error

Posted under C Programming

Answer: (c).Garbage value

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?