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

__________ should be used to declare the size of an array, because it makes the program more scalable

Const variable

________contains function prototype for rand?

<cstdlib>

"a" in line //1 equal to ?

This code does not compile it has a syntax error.

Absolute value of x:

fabs(x)

Array of characters is __________.

String

A function can make

As many throws of as many types as necessary

A value-returning function can be used ____.

all of the above

An array is not:

Made up of different data types.

An uninitialized local variable contains:

The value last stored in the memory location reserved for that variable.

Antonym of increment:

decrement

Сommand "\t" means:

Move the screen cursor to the next tab stop.

Cycle with postcondition ?

do while

Choose true statement:

Vector can change the length, array can't

class student {string name, surname} Aibar;

What is underlined?

object of class student

Constructors are used to:

Initalize the objects

Determine the value of x after executing series of commands:

-4

Determine the value of x after executing series of commands:

7

Determine the value of x after executing a series of commands:

22

Define a constant variable arraySize initialized to 5.

const int arraySize = 5

Declare an array with arraySize elements of type double, and initialize the elements to 0.

double fractions[ arraySize ] = { 0.0 };

Default Arguments

Function call with omitted parameters

Differences between references and pointers:

All of them

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

true

Empty parameter lists

All of them

Every recursion should have the following characteristics.

All of them

How could you call in main the function input in object school of some class?

c. school::input()

How would you output to an open file named a_file?

D. a_file.printf("Output");

How many specifiers are present in access specifiers in class? 3

How many bytes one integer occupies in the memory?4 bytes

How to declare operator function? operator operator sign

How many sizes do integers come in? 3

How to access the object in the class?

direct member access operator

How many objects can present in a single class?

a) 1

b) 2

c) 3

d) as many as possible

Function Overloading is ____

Functions with same name and different parameters

Function templates can accept

only parameters of the basic type

Function swap()

exchanges the values of the two integer variables pointed to by its arguments.

Find error statement:

3.14 % 3

Find the error.

n isn’t constant number

Find the error.

main function is incorrect

Find the wrong initialize.

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

b)a[ 3 ]={4,7,9,4};

c)a[ 5 ]={6,2,8,9,1};

d)a[ 4 ]={1,9,2};

e)a[ 2 ]={1,2};

Find the correct declared vector.

<vector> int v;

Find the error:

error in line //3

Format for function definition:

Find the error:

error in line //3

Find the logical operator AND

&&

Find the error:

e=*5

Find the logical operator NOT?

!=

In which type does the enumerators are stored by the compiler?

integer

In classes, if we declare object without keywords like public, which type will it be of? private

Inline function is ____

Asks the compiler to copy code into program instead of making function call

If the type specified of parameters of a function is followed by an ampersand & that function call is pass by reference

If expression1 – false and expression2 –false, than expression1 || expression2 is: false

If grade has the value of 60, what will the following code display?

Passed

It is necessary to declare the type of a function in the calling program if the function

Returns a non-integer value

In this code forgotten:

break

Given the following function declaration and local variable declarations, which of the following is not a correct function call?

void someFunction(int& first, double second, char third);

Keyword of structure

Struct

Lists and tables of values can be stored in __________ or __________. Arrays, Vectors

Logical operators are used to:

form more complex conditions by combining simple conditions

Modulus (remainder) operator: %

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

Operator _____ used to output: cout

Operator________ used to make decisions: If

Operator overloading is both a & b

Programming Language C + + developed by:

Bjarne Stroustrup

Recursive function a and b

Specify the object- oriented programming language

C++

Structure definition

Switch can be used to test: int constants.

Set of integers with identifiers

a) randomize

b) prototype

c) function

d) enumeration

e) returning

There is one mistake in code, in which line?

e.5

This statement can be used to implement any counter-controlled loop: while

The logical operator || means: or

Tells compiler argument type and return type of function:

function prototype

The elements of an array are related by the fact that they have the same ________ and ___________. name, type

The number used to refer to a particular element of an array is called its ________. subscript

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

The number used to refer to a particular element of an array is called its _______. index

The number of elements in a vector is called:

size of vector

The elements of an array are related by the fact that they have the same ____ and_____.

name and type

The default parameter passing mechanism is

Call by value

The OR (||) operator:

Stops evaluation upon finding one condition to be true

The inline keyword:

Should be used with all frequently used functions.

Using operator = = for: equality

Using operator = for: assignment

Use of functions All of the above

Unary scope resolution operator is ::

Unless otherwise specified, entire arrays are passed __________ and individual array elements are passed __________.

By reference, by value.

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