Mod 3 Flashcards

Make me smarter

1
Q

Four basic data types

A

Character integer float boolean

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

//

                                     /*

                                     */
A

Comments - compiler ignores everything after the comment until the end of the line.

Single line comment
Start multiple line comment
Stop multiple line comment

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

Four essential Loop actions

I
C
C
B

A

Initialization: assigns initial value

Condition: evaluate the control variable to determine whether the loop should execute or not

Change: changes the value of the control variable to ensure the loop as a means to exit.

Body: statements defined between the opening and closing curly braces of the for Loop.

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

If
Else if
Else
Are all what?

A

If statements

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

!
&&
| |

These are what kind of statements and what are their names.

A

Decision statements
Not
And
Or

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

What is a constant?

A

A named memory location whose value cannot change

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

What is a variable

A

A named memory location

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

What are the four program structural components?

D
I
P
O

A

Declarations: storage for data being workedwith.

Input: allows acquisition of data from a source.

Processing: manipulating data to arrive at a result.

Output: provides processed data to find a destination. Could be a monitor a file on the hard drive or a web page

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

What are the four program structural components?

D
I
P
O

A

Declarations: storage for data being workedwith.

Input: allows acquisition of data from a source.

Processing: manipulating data to arrive at a result.

Output: provides processed data to find a destination. Could be a monitor a file on the hard drive or a web page

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

———–>

What is this symbol called?

A

flow line

It shows the direction of program flow on a flowchart.

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

What is the flowchart symbol for a predefined process?

A

The symbol should be a rectangle with two thin vertical rectangles on either side.

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

What is the flowchart symbol for decision?

A

The symbol is a daimond it represents Branch based boolean decision making. Has a true or false output.

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

What is the flowchart symbol for input/output?

A

It should look like a parallelogram and represents input from user or output to a display.

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

What is the flowchart symbol for terminal?

A

Terminal is represented by an oval and represents a programs start or stop point.

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

What is the flowchart symbol for process?

A

The symbol is a rectangle and it represents an action to be executed.

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

int my number = 0;

Is a?

A

Integer

16
Q

float myNumber = 0.0;

Is a?

A

Float

17
Q

char meLetter = ‘A’

Is a?

A

Character

18
Q

bool mybool = true;

Is a?

A

Boolean variable

19
Q

Two terms associated with strings?

A

Index and element

20
Q

What does concatenation do?

Ex below

std: :String str1 = “you got “;
std: :String str2 =”that right”;
std: :String str3 = str1+” “+str2;

A

It’s the process of joining two strings.

21
Q
Name the symbols and the group they belong to.
\n
\t
\0
\"
\\
A
Group is escape characters.
New line
Tab
Null if it's inside a string
Double quote if inside a string
Single slash back inside a string
22
Q

What type and what do they represent?
STDOUT
STDERR
STDIN

A

They are input/output types
STDOUT- OUTPUT TO A MONITOR
STDERR-STANDARD ERROR
STDIN-STANDARD INPUT

23
Q

What is

COUT

A

Output to display

24
Q

What is

CERR

A

Displays error messages on the screen.

25
Q

What is

CIN

A

Input, program received information.

26
Q

What does,
std::cin
do?

A

Reed’s numbers single line characters and strings of letters stops at White spaces if multiple lines are typed

27
Q
What does
get line()
Do?
A

Reads all data including white spaces.

28
Q

What is
ws()
used for?

A

It’s placed on the line previous to getline() when using a program that mixes both getline() and cin when receiving an input. Reads white spaces.