CHAP 3 INTRO TO C++ Flashcards

(33 cards)

1
Q

The % operator may appear ONLY with [ ] values.

A

integer

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

positive or negative integers with or without a sign. (commas are not allowed)

A

int (integer)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

unlike the output statement which may contain constants, variables or more complicated expressions, the only items that may be specified in an input statement are the names of one or more variables.

true or false

A

true

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

C++ allows operators to be combined for a [ ] . Many environments discourage the use of operators in this way as it can make a program more difficult to read and understand.

A

short-hand notation
combined operators

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

main function

A

{
variable declarations
executable statements
}

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

general form of cout

A

cout&laquo_space;ExprOrString &laquo_space;ExprOrString …

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

true of false

A

bool

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

use the current value of n in the expression and when finished, increment/decrement n.

A

N++
N–

POSTfix

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

types of identifiers

A

Letters (LOWERCASE/UPPERCASE)
DIGITS (0-9)
THE UNDERSCORE ( _ ) CHARACTER

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

the process of implementing the algorithm using a language the computer can understand

A

computer programming

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

causes the cursor to move to the beginning of the next line. This is one way to get blank lines in your output.

A

š‘’š‘›š‘‘š‘™ (end line)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

is a predefined variable in C++ that indicates you are going to input a stream of characters from an input device ([ ] is associated with the standard input device which is the keyboard).

A

cin&raquo_space;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

information of the program needs (a list of all necessary header files used in the program).

A

preprossesors directives

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

A set of valid data values along with the operations that may be performed on those values.

A

data types

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

positive or negative numbers containing an integer part and a fractional part with a decimal point in between.

A

float/double

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

{
//Executable Statements
ā‹®
return 0;
}

A

main function

17
Q

where can you find the values of uppercase and lowercase letters and numbers?

18
Q

a set of characters used to hold data containing more than one character enclosed in double quotes.

19
Q

true or false

you can have an identifier like this :
123ABc

20
Q

When expressions are evaluated, they are evaluated left to right according to the following precedence rules:

21
Q

assignment statement:

A

syntax: variable = expression;

22
Q

int main ( )

23
Q

is a set of special words, symbols and rules for constructing a program. There are many programming languages each with their own set of rules.

A

programming language

24
Q

increment/decrement the contents of n and use the new value of n in the expression.

A

++N
–N

PREfix

25
[ ] expressions can be made up of constants, variables, operators and parentheses.
Arithmetic
26
+= āˆ’= āˆ—= /= %= &= |= ^=
combined operators
27
#include using namespace std;
preprossesor directives
28
GENERAL FORM OF CIN:
cin >> variable1 >> variable2 … ;
29
is a predefined variable in C++ that indicates you are going to output a stream of characters to an output device.
cout <<
30
int main ( ) - functions by definition return a value
heading
31
C++ is [ ], In other words, uppercase and lowercase letters are considered to be different. true or false
case-sensitive true
32
one alphanumeric character enclosed in single quotes.
char
33
are used in C++ to name things.
Identifiers