adplus-dvertising
frame-decoration

Question

What is the output of this program?
void main()
{
      int arr[10];
      printf("%d %d", arr[-2], arr[11]);
}

a.

0 0

b.

Garbage value 0

c.

Garbage value Garbage value

d.

Compilation Error

Posted under C Programming

Answer: (c).Garbage value 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 this program?