Default constructor

Question78

An array can store many different types of values

Ответ:

True False

Question79

What is required to avoid falling through from one case to the next?

break;

Question80

What is the output of the program?

#include <iostream>

using namespace std;

int main() {

int n = 1;

while (n<=5)

cout << ++n;

return 0;

}

Question81

Write a C++ statement or a set of C++ statements to sum the odd integers between 1 and 99 using a for statement. Assume the integer variables sum and count have been declared.

sum = 0;
for (count = 1; count <= 99; count += 2) sum +=

Question83

An array subscript should normally be of data type float

Ответ:

True False

Question84

If ASCII code of 'd' is 100, what is the ASCII code of 'a'?

. 97

Question85

A C++ program that prints three lines of output must contain three statements using cout and the stream insertion operator.

Ответ:

True False

Question87

State the values of the variable after the calculation is performed. Assume that, when a statement begins executing, all variables have the integer value 5: quotient /= ++x;

Result:
quotient =
x =

Question88

What value for y gets printed in the program below?
#include <iostream>
const int x = 12;

int main(int argc, char** argv)
{
enum dog
{
x = x,
y
};

std::cout << y << std::endl;

return 0;
}

Question89

What does the program below output?

#include<iostream>

usingnamespace std;

int main() {

int a[6] = {3,5,1,6,8,2};

int idx = 0;

for (int i=0; i<6; i++)

if (a[idx]<a[i])

idx = i;

cout << a[idx] << endl;

return 0;

}

Question90

Set variable x to 1

Ответ:

Question91

Program components in C++ are called ________ and ________.


Понравилась статья? Добавь ее в закладку (CTRL+D) и не забудь поделиться с друзьями:  



double arrow
Сейчас читают про: