Programming Chapter 2

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

True

Post-Increment has the syntax variable++.

True

Suppose a=5. After the execution of the statement ++a; the value of a is 6.

Alpha=50

Suppose that alpha and beta are int variables and alpha = 5 and beta = 10. After the statement alpha *= beta; executes, ____.

Alpha = 50

Suppose that alpha and beta are int variables and alpha = 5 and beta =10. After the statement alpha*=beta; executes, _________.

True

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

False

A unary operator has only two operands.

Mixed Expression

An expression that has operands of different data types is called a _________.

True

C++ tokens include special symbols, word symbols, and identifiers

False

Comments are for the compiler, not the reader

True

If a C++ arithmetic expression has no parentheses, operators are evaluated from left to right.

Assignment Operator

In C++, = is called the ________.

char

The ______ data type, the smallest integral data type, is used to represent characters.

Syntax

The ______ rules of a programming language tell you which statements are legal, or accepted, by the programming language.

Bool

The data type _____ has only two values: true and false.

Four

The memory allocated for a float is ______ bytes.

3

The value of the expression 17%7 is ______

3

The value of the expression 33/10, assuming both values are integral data types, is _________.

program_1

Which of the following is a legal identifier?

\n

Which of the following is the newline character?

46259

________ is a valid int value.

False

cin does not allow more than one value to be read at a time


Kaugnay na mga set ng pag-aaral

NTDT 200 - Chapter 13: Major Minerals

View Set

BUS320 Worksheet 19.3: State Securities Laws

View Set

•The Marshall Plan: effect of Marshall Aid and the Soviet response; Cominform and Comecon; Yugoslavia; Czechoslovakia • The Berlin Blockade and Airlift

View Set

Chapter 9 Modules - Alasti Articulations test

View Set

Ch. 12 Commercial Inland Marine Insurance

View Set

Health Assessment Practice B ATI

View Set

statistics ch 8 interval estimation

View Set

โลกาภิวัตน์และสังคมวิทยา globalization & sociology

View Set