subject

What is the output of the following code?

int x;
int *p;
int *q;

p=new int [10];

q=p;
*p=4;

for (int j = 0; j < 10; j++)
{
x = *p;
p++;
*p = x + j;
}

for (int k = 0; k < 10; k++)
{
cout < < *q < < "";
q++;
}

cout < < endl;

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 19:30
Singing in the rain: this first part of the film shows the early history of motion picture. how accurate do you think the portrayal of the early motion picture industry is? why? is historical accuracy important in films and theater productions? explain.
Answers: 1
question
Computers and Technology, 23.06.2019 18:30
How often does colleges update the cost of attendance on their website? . a)every two years b) every four years c) every year d) every semester
Answers: 1
question
Computers and Technology, 23.06.2019 23:00
Lucas put a lot of thought into the design for his company's new white paper. he made sure to include repeating design elements such as color schemes and decorative images. his goal was to a.add symmetry b.create a unified publication c.provide consistency d.save money
Answers: 1
question
Computers and Technology, 24.06.2019 18:20
The following if statement contains a logic error, not a syntax error. rewrite it so that it is correct. assume the variable age already exists and holds a valid number. if (age == 18 & & age == 19) {
Answers: 1
You know the right answer?
What is the output of the following code?

int x;
int *p;
int *q;
Questions
question
Mathematics, 13.06.2020 19:57