Exam 1: Code Flashcards

0
Q

Addition

A

+

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

Assignment

A

=

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

Subtraction

A

-

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

Multiplication

A

*

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

Integer Division

A

Integer / Integer

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

Exact Division

A

.0 / #.0

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

Remainder Division

A

%

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

One Line Comment

A

//

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

Multiple Line Comment

A

Start /*

End */

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

Ends a Statement

A

;

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

Output

A

Cout«

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

Input

A

Cin»

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

New Line

A

\n

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

More than

A

>

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

Less than

A

<

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

More than or equal to

A

> =

16
Q

Less than or equal to

A

<=

17
Q

Comparison for equal

A

==

18
Q

Comparison for not equal

A

!=

19
Q

And

A

&&

20
Q

Or

A

||

21
Q

Not

A

!

22
Q

Integer declaration, least memory

A

Short

23
Q

Integer declaration, medium memory

A

Int

24
Q

Integer declaration, medium memory, always positive

A

Unsigned int

25
Q

Integer declaration, most memory

A

Long

26
Q

Floating Point declaration, least memory

A

Float

27
Q

Floating Point declaration, medium memory

A

Double

28
Q

Floating Point declaration, most memory

A

Long double

29
Q

Character declaration

A

Char

30
Q

Basic decision

A

If (test)

Statement;

31
Q

If/else decision

A

If ( )
Statement;
Else
Statement;

32
Q

Basic loop

A

While ( )

Statement;

33
Q

Force output

A

Flush

34
Q

Force output & go to a new line

A

Endl

35
Q

Input/output stream

A
#include
Using namespace std;
36
Q

General Form

A

Int
Main( )
{

}

37
Q

Order of Operations

A
  1. ( )
  2. !
    • / %
    • -
  3. > > = < <=
  4. == !=
  5. &&
  6. ||
  7. =