Output of the code?

FUNC

Loading

โœช Choose the correct option.

Output of the code?


FUNC (int *p)
{
p = (int *)malloc(100);
printf("p:%x",p);
}

int main( )
{
int *ptr;
FUNC(ptr);
printf("Ptr:%x",ptr);
return 0;
}

A. Both printf statements prints same values
B. Both print different values
C. Gives compile time error
D. Gives run time error

Leave a Comment