Question: Question 4 (3 points) 3 6 1. int main() { 2. float y = 56; 3. const float* ptr = &y; 4. *ptr++; 5. printf(%5.2f,
Question 4 (3 points) 3 6 1. int main() { 2. float y = 56; 3. const float* ptr = &y; 4. *ptr++; 5. printf("%5.2f", *ptr); return 0; } 1 12 Which of the following choices most correctly explains working of the above code? It displays 57 as the value is indirectly increased using pointer *ptr. It displays a garbage value because the pointer 'tr' was not properly dereferenced on line #4 5 It displays 0.00 because it reinitializes y via pointer ptr. It gives a syntax error as pointer 'tr' is declared as constant, yet it is incremented on line 4
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
