Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Preparation for Final Exam MCQ Quiz BIG.docx
Скачиваний:
15
Добавлен:
25.02.2016
Размер:
49.93 Кб
Скачать

Int main() {

int a = 1;

do {

a+=1;

cout << a;

} while (a<5);

return 0;

}

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

b. 123456

c. 2345

d. 23456

e. 1234

Question 17

Баллов: 1

Why would you want to use inline functions?

Выберите один ответ. a. To increase the speed of the resulting program

b. To decrease the size of the resulting program

c. To remove unnecessary functions

d. To make your code more clear

e. To simplify the source code file

Question 18

Баллов: 1

The efficiency of merge sort is ______

Выберите один ответ. a. O ( n * 2 )

b. O ( n )

c. O(n log n)

Question 19

Баллов: 1

The break statement is required in the default case of a switch selection statement to exit the switch properly

Ответ:

True

False

Question 20

Баллов: 1

Class members are accessed via the ________ operator in conjunction with the name of an object (or reference to an object) of the class or via the ___________ operator in conjunction with a pointer to an object of the class

Выберите один ответ. a. semicolon (;), arrow (->)

b. comma (,), arrow (->)

c. dot (.), arrow (->)

d. colon (, arrow (->)

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

Preparation for Final Exam MCQ Quiz BIG - Попытка 1

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

Question 21

Баллов: 1

Write one or more statements that perform the following task for and array called “fractions”. Assign the value 3.333 to the seventh element of the array

Выберите один ответ. a. fractions( 6 ) = 3.333;

b. fractions( 7 ) = 3.333;

c. fractions[ 7 ] = 3.333;

d. no ideas

e. fractions[ 6 ] = 3.333;

Question 22

Баллов: 1

Give the function header for the following function. Function hypotenuse that takes two double-precision, floating-point arguments, side1 and side2, and returns a double-precision, floating-point result.

Выберите один ответ. a. double hypotenuse( double side1, double side2)

b. not sure

c. float hypotenuse( float side1, float side2)

d. float hypotenuse( double side1, double side2)

e. double float hypotenuse( double float side1, double float side2)

Question 23

Баллов: 1

Find statement that performs a fourth element calling in the array "fraction":

Выберите один ответ. a. fractions[ 3 ]

b. fractions( 3 )

c. fractions( 4 )

d. fractions[ 4 ]

Question 24

Баллов: 1

Every C++ program begins execution at the function ?

Question 25

Баллов: 1

Which of the following is not a correct variable type?

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

b. char

c. real

d. float

e. double

Question 26

Баллов: 1

What value gets printed by the program?

#include <iostream>

struct Foo

{

int x;

operator int()

{

return 21;

}

};

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]