adplus-dvertising
frame-decoration

Question

What is the output of this program?
#include <stdio.h>
#include  <stdlib.h>
int main()
{
  int i, numbers[1];
  numbers[0] = 15;
  free(numbers);
  printf("Stored integers are ");
  printf("numbers[%d] = %d ", 0, numbers[0]);
  return 0;
}

a.

15

b.

Compilation error

c.

0

d.

garbage value

Posted under C Programming

Answer: (a).15

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?