test cosc 2

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

Suppose that alpha and beta are int variables. The statement alpha = --beta; is equivalent to the statement(s) ____.

beta = beta-1 alpha = beta

An operator that has only one operand is called a unique operator.

false

In C++, reserved words are the same as predefined identifiers.

false

a comma is also called a statement terminator

false

suppose a =5. after the execution of the statement ++a; the value of a is 6

false

the escape sequence /r moves the insertion point to the beggining of the next line

false

The memory allocated for a float value is ____ bytes.

four

In a C++ program, one and two are double variables and input values are 10.5 and 30.6. After the statement cin >> one >> two; executes, ____.

one = 10.5, two=30.6

which of the folowing is a legal identifier

program_1

__ are executable statements that inform the user what to do

prompt lines

Choose the output of the following C++ statement: cout << "Sunny " << '\n' << "Day " << endl;

sunny day

Suppose we declare a variable sum as an int. The statement "sum += 7;" is equivalent to the statement "sum = sum + 7;".

true

the maximum number of significant digits in values of the double type is 15.

true

which of the following is the newline character

/n

The length of the string "computer science" is ____.

16

suppose that the count is an int invariable and count =1. After the statement count ++; executes the value of count is ____.

2

The value of the expression 17 % 7 is ____.

3

__ is a valid int value.

46259

the expression static_cast<int> (9.9) evaluates to

9

Suppose that alpha and beta are int variables. The statement alpha = beta ++; is equivalent to the statement(s) ____.

alpha = beta; beta = beta + 1;

suppose that alpha and beta are int variables. the statement alpha = beta --; is equivalent to the statements

alpha = beta; beta = beta - 1;

suppose that alpha and beta are int variables. the statement aplha=++beta;is equivalent to the statement(s)

alpha=beta+1;

which of the following is a reserved wrd in c++

char

consider the following code. in this code where does the include statement belong

insertion point 1

the declaration int a, b, c; is equivlent to which of the following

int a, b, c;


Set pelajaran terkait

Life insurance and Health Common to Life Health Insurance

View Set

Unit 1 AP Gov Participatory democracy

View Set

AHMS 270E: Medical Ethics Week 3-4

View Set