Question: 5. What will be printed out when the following code is executed? Assume p starts with address 0x00C0 and the address returned by malloc is
5. What will be printed out when the following code is executed? Assume p starts with address 0x00C0 and the address returned by malloc is 0xFF00. float p = 11.0; p=p+ 2.0; float *q=&p; float *r=q; *r= *r + 1; int *s = (int *) malloc(sizeof(int)); *s = *q *q=*q* 10.0; *r= 15.0; printf("%f ", p); printf("%f ", *q); printf("%d ", r); printf("%d ",*s); printf("%f ", *r)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
