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

Int main(int argc, char** argv)

{

Foo f;

f.x = 11;

std::cout << (0?3:f) << std::endl;

return 0;

}

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

b. 21

c. 0

d. undefined

e. 3

Question 27

Баллов: 1

When does the code block following while(x<100) execute?

Выберите один ответ. a. When x is less than one hundred

b. Infinite loop

c. When x is greater than one hundred

d. When x is equal to one hundred

e. While it wishes

Question 28

Баллов: 1

Write a single statement that performs the specified task. Assume that floating-point variables number1 and number2 have been declared and that number1 has been initialized to 7.3. Assume that variable ptr is of type char *. Assume that arrays s1 and s2 are each 100-element char arrays that are initialized with string literals. Declare the variable fPtr to be a pointer to an object of type double.

Выберите один ответ. a. double *&fPtr;

b. double *fPtr;

c. double &fPtr;

Question 29

Баллов: 1

The process of placing the elements of an array in order is called ________ the array

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

b. replacing

c. relocation

d. searching

Question 30

Баллов: 1

Which header file do you need to include to use typecasting?

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

b. ctype.h

c. math.h

d. iostream.h

e. None

Страница: (Назад) 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;

}

};

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