Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started