Locations in the array: 0 1 2 3 4 5 6 (line 1) int x[] = (20.7. 2, 15, 19,6, 8), 'ptr = &x[1]; (line 2) *ptr = *ptr + 3;

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Locations in the array: 0 1 2 3 4 5 6 (line 1) int x[] = (20.7. 2, 15, 19,6, 8), 'ptr = &x[1]; (line 2) *ptr = *ptr + 3;

Post by answerhappygod »

Locations In The Array 0 1 2 3 4 5 6 Line 1 Int X 20 7 2 15 19 6 8 Ptr X 1 Line 2 Ptr Ptr 3 1
Locations In The Array 0 1 2 3 4 5 6 Line 1 Int X 20 7 2 15 19 6 8 Ptr X 1 Line 2 Ptr Ptr 3 1 (45.91 KiB) Viewed 28 times
Locations in the array: 0 1 2 3 4 5 6 (line 1) int x[] = (20.7. 2, 15, 19,6, 8), 'ptr = &x[1]; (line 2) *ptr = *ptr + 3; (line 3) "(ptr+5) = x[3]; Q1. (3pts) What is the value of "ptr after initialization after line 1? Q2. (3pts) What is the value of *ptr after the execution of line 2? Q3. (3pts) What is the value of "(ptr+5) after the execution of line 3? Q4. (14pts) What are the values in the whole array when all three lines of code have been executed?
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply