Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Документ.rtf
Скачиваний:
8
Добавлен:
25.02.2016
Размер:
140.88 Кб
Скачать

Preparation for Final Exam mcq Quiz big - Попытка 1

Страница:  (Назад)  1  2  3  4  5  6  7  8  9  10  (Далее) 

Question61

Баллов: 1

What statement is used to make decisions:

Выберите один ответ.

a. while

b. not

c. true/false

d. and

e. if

Question62

Баллов: 1

If the variable number is not equal to 7, print "The variable number is not equal to 7".

Выберите один ответ.

a. if ( number == 7 ) std::cout << "The variable number is not equal to 7\n";

b. if ( number < > 7 ) std::cout << "The variable number is not equal to 7\n";

c. if ( number = 7 ) std::cout << "The variable number is not equal to 7\n";

d. if ( number >< 7 ) std::cout << "The variable number is not equal to 7\n";

e. if ( number != 7 ) std::cout << "The variable number is not equal to 7\n";

Question63

Баллов: 1

Which of the following correctly accesses the seventh element stored in foo, an array with 100 elements?

Выберите один ответ.

a. foo[7];

b. foo;

c. foo[100]

d. foo(6);

e. foo[100-94];

Question64

Баллов: 1

Correct the mistakes

float a, b, c;

cin << a,b,c;

Выберите один ответ.

a. cin << a,b,c;

b. cin >> a,b,c;

c. cin << a; b; c;

d. cin >> a; b; c;

e. cin >> a >> b >> c;

Question65

Баллов: 1

If we have this code:char arr[8];cin >> arr;And this text is entered: Hello World , what there will be in arr ?

Выберите один ответ.

a. Other

b. Hello

c. Hello W

d. Hello Wo

e. Hello World

Question66

Баллов: 1

A variable that is known only within the function in which it is defined is called a________.

Выберите один ответ.

a. local variable

b. static variable

c. class variable

d. temporary variable

e. global variable

Question67

Баллов: 1

If we have class A with variable Name in it and write: A *obj , how do you invoke the Name variable?

Выберите один ответ.

a. A.Name

b. A->Name

c. obj.Name

d. obj->Name

e. None of these will work

Question68

Баллов: 1

Which properly declares a variable of struct foo?

Выберите один ответ.

a. foo var;

b. struct foo;

c. var foo;

d. int foo;

e. foo;

Question69

Баллов: 1

Given the assumptions in the comments, what values is printed for x?int main(int argc, char** argv) { std::cout << sizeof(int) << std::endl; int x = 0x1000; x = x << 32; std::cout << std::hex << x << std::endl; return 0; } 

Выберите один ответ.

a. 0

b. undefined

c. 0x00000000

d. implementation defined

e. 0xFFFFFFFF

Question70

Баллов: 1

When it is not known in advance how many times a set of statements will be repeated, avalue can be used to terminate the repetition.

 

Страница:  (HYPERLINK "javascript:navigate(5);"НазадHYPERLINK "javascript:navigate(5);")  1  2  3  4  5  6  7  8  9  10  (HYPERLINK "javascript:navigate(7);"ДалееHYPERLINK "javascript:navigate(7);")