Question: solve for the blank (make sure use C++) #include int main() { int *ptr, *a; int b, c; int d[10]; b = 10 + 6;

solve for the blank (make sure use C++)

#include

int main()

{

int *ptr, *a;

int b, c;

int d[10];

b = 10 + 6;

c = 10 + 1;

ptr = &c;

a = &b;

for (b = 0; b < 10; b += 1)

{

d[b] = b + 2;

}

//*ptr = ____

//*a = ____

//b = ____

//c = ____

//d = ____ ____ ____ ____ ____ ____ ____ ____ ____ ____

b = 4 + 11;

c = 7;

//*ptr = ____

//*a = ____

//b = ____

//c = ____

//d = ____ ____ ____ ____ ____ ____ ____ ____ ____ ____

for (c = 0; c < 10; c += 2)

{

printf("%d ",d[c]);

d[c + 1] = c / 2 + 10;

}

//*ptr = ____

//*a = ____

//b = ____

//c = ____

//d = ____ ____ ____ ____ ____ ____ ____ ____ ____ ____

a = &c;

for (c = 0; c < 10; c += 2)

{

printf("%d ",d[c]);

d[c + 1] = c / 2 + 10;

if (c % 4 == 0) { printf(" "); }

}

//*ptr = ____

//*a = ____

//b = ____

//c = ____

//d = ____ ____ ____ ____ ____ ____ ____ ____ ____ ____

ptr = &d[4];

a = &d[3];

for (*a = 1; *a < 4; *a += 1)

{

ptr[*a] = *a + 1;

printf("%d %d ", *a, ptr[*a]);

}

//*ptr = ____

//*a = ____

//b = ____

//c = ____

//d = ____ ____ ____ ____ ____ ____ ____ ____ ____ ____

printf("-- %d -- ", *d + 8);

printf("-- %d -- ", ptr[30 % 5] + 8);

return(0);

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!