What will be the output of the following program:

1.8 What will be the output of the following program:
Main()
{
int val = 500;
int *ptr = &val;
int **ptr1 = &ptr;
printf(“val = %d”, **ptr1);
}

A) 500
B) address of ptr
C) contents of ptr
D) none of the above


Leave a Reply