Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ For the code below, describe what is happening at each line of code My work so far: The first is setting the first element

C++

For the code below, describe what is happening at each line of code

My work so far:

The first is setting the first element of the array to 1

next, the second element of the array is set to 4

the third set of code sets the third element to whatever the first element was (1) [with the exception of 2, 4 I found, don't know why]

The next part gets really funky.

This is what is prints out to the terminal:

image text in transcribed

image text in transcribed

thanks for your help

Numbers: 1 4 4 21928 4 5 #include using namespace std; int main() int numbers [6] ; int * P; P = numbers; *P = 1; p++; *P = 4; p = &numbers [2] ; *p = numbers [0]; p = numbers + *p; *P = 4; P = numbers+1; *(p+4) = 5; cout

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle RMAN For Absolute Beginners

Authors: Darl Kuhn

1st Edition

1484207637, 9781484207635

More Books

Students also viewed these Databases questions