Top

Discussion

What is the output of this program?

#include 
#include  
int main()
{
   int *numbers = (int*)calloc(4, sizeof(int));
   numbers[0] = 2;
   free(numbers);
   printf("Stored integers are ");
   printf("numbers[%d] = %d ", 0, numbers[0]);
   return 0;
}

 

  • A.Garbage value
  • B.2
  • C.Compilation error

Answer:

No comment is present. Be the first to comment.
Loading…

Post your comment