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

C) form more complex conditions by combining simple conditions.

d) form long code.

e) no answer

The antonym of increment is:

a) normal b) decrement c) long d) big e) no answer

This section discusses how to use break in a repetition statement. Which statement?

a) switch b) function c) break and continue Statements d) do e) class

.A logical operator || means:

a) not b) and c) or d) yes e) noting

! (logical negation) operator truth table. If expression – false, than !expression - ?

a) true b) false c) false and true d) no answer e) noting

A logical operator ! means:

a) not b) and c) or d) yes e) noting

Using operator = = for:

a) more than b) less than c) assignment d) equality e) noting

Using operator = for:

a) more than b) less than c) assignment d) equality e) noting

What displays this code?

int і = -3, a = -3;  while(а - i)  а = і++;

a) 0

b)3

c)4

d) undefined

e)-3

What is equal in a line // 1?

a)the program never gets to the line / / 1 due to an infinite loop

b)1

c)-1

d)this code will not compile because contains a syntax error

e)0

Which of the following code snippets correctly declared pointers?

a)int *p4 = new int;

b)int * p1;

c)float p5*;

d)int z = 20;

e)int* p3 = &z;

What will be printed?

  • 011.2.D

  • Compile error in line 1001.2.D.

  • 0112.D.

  • 0.1.2

Cycle with a precondition?

a)do while

b)for

c)while

d) int

e)char

Which of the following isn’t correct variable type?

a) float

b)real

c)int

d)double

e)char

Evaluate (1 && !(0 || 1)).

a)false

b)true

c)unevaluatable

d) evalueatable

Find of the operator logical-end?

a)&

b)!

c)&&

d)==

e)|&

Which isn’t a loop structure?

a)for

b)while

c)repeat until

d)if

e)do while

How many times is a do while loop quaranteed to loop?

a)0

b)infinitely

c)1

d)variable

e)2

Find the error:

a)c+=7;

b) d-=4;

c)e=*5;

d)f/ =3;

e)g % =9;

Which service марк is placed after the operator case?

a) :

b) -

c) +

d) .

e) ;

Find of the operator logical-NOT?

a) =

b) !&

c)!=

d)*

e)::

Which will be equal to the variable a, after this code int a; for(a = 0; a < 10; a++) {}?

a)1

b)10

c)9

d)0

e)-1

What function should contain all the programs in C + +?

a) program()

b) system()

c) main()

d) start()

e) finish()

what returns a number ranging from 0 to num-1?

a) functions b) array c)random d)structure e) class

what is contains function prototype for rand ??

a) <cstdlib> b) <iomanip> c) <ctime> d) <cmath> e)<iostream>

No need to explicitly set the seed each time, and for this I need to use??\

a) srand b)array c) class d)random e)time

Constants start at 0 (default) is incremented by 1 in which program?

a) srand b)array c) enum d)random e)time

cout << "Shows a random number between 1-15: " << xRan; write a program using random

a) face = 1 + rand() % 6;

b)i = rand() % 15- 1;

c)i = rand() % 15+ 14;

d) i = rand() % 15-0;

e) i=rand()%15+1;

Find the error:

a)there are no errors in the code

b)error in line //1

c)error in line //2

d)error in line //3

e)error in line //4

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