C++ Programming and Technical undefined

Pankaj makes a program to print the product of cubes of the first 10 whole numbers.

She writes the following program:

integer x = 0 // statement 1

integer x = 0 // statement 1

integer sum = 0 // statement 2

while ( x < 10 ) // statement 3

{

sum = x*x*x // statement 4


x = x + 1 // statement 5

}

print sum // statement 6


Is her program correct? If not, which statement will you modify to correct it?

a. No error, the program is correct

b. Statement 1

c. Statement 4

d. statement 6

Read Solution (Total 9)

C++ Other Question

pas w wur iurwrp whjyrwo w oyrwrwn wyrpwy r wropwrwu oprwv rwyp yw rworhy r wr Which one of the following is the correct option showing the declaration(s) of a pointer to constant integer?

[1] const int* a;
[2] int* const a;
[3] int const* a;
[4] 1 and 3 both
[5] 1 and 2 both
[6] 2 and 3 both
[7] None of the above