Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

What will the following code printout? void Function(int *ptr) { *ptr = 11; } // In Main... int values[] = {4, 10, 6, 12, 8,

What will the following code printout?

void Function(int *ptr)

{

*ptr = 11;

}

// In Main...

int values[] = {4, 10, 6, 12, 8, 14};

int *p = &values[4];

Function(p);

for(int i = 2; i < 5; i++)

cout << values[i] << ' ';

a) 6 12 8 14

b) 6 12 8

c) 4 10 6 11 8 14

d) 6 12 11

e) 6 12 11 14

I know the answer is D, but I do not know why! Can someone please explain it to me ! Thank you

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

Database 101

Authors: Guy Kawasaki

1st Edition

0938151525, 978-0938151524

More Books

Students also viewed these Databases questions

Question

What is job enlargement ?

Answered: 1 week ago

Question

what is the most common cause of preterm birth in twin pregnancies?

Answered: 1 week ago

Question

Which diagnostic test is most commonly used to confirm PROM?

Answered: 1 week ago

Question

What is the hallmark clinical feature of a molar pregnancy?

Answered: 1 week ago