M3S1 Part 2 Flashcards

1
Q

Their purpose is only to allow
the programmer to insert notes
or descriptions embedded
within the source code.

A

/* block comments */

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

All the elements of the standard C++ library are declared within
what is called a

A

namespace with the name std

using namespace std;

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

a special function in all C++ programs;

it is the function called when the program is run.

A

int main ()

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

is a semi color required at the end of int main()?

A

no

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

indicates the beginning of main’s function

definition

A

open brace

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

indicates the
end of main’s function
definition

A

closing brace

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

Everything between the braces

A

function’s body

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

defines what happens when main is called.

A

function’s body

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

All functions use braces to indicate the

A

beginning and end of their

definitions.

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

a simple or compound
expression that can actually produce
some effect.

A

statement

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

It is the meat of a program, specifying

its actual behavior.

A

Program statement

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

is a semicolon required in the end of a program statement?

A

yes

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

is a group
of two or more C++
statements enclosed in
braces.

A

A compound statement,

also called a block

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

This defines the exit status of the

process or application.

A

return 0;

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

It terminates main( )function and
causes it to return the value 0 to
the calling process.

A

return 0;

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

should return 0 end with a ;?

A

yes