C++ Flashcards

(8 cards)

1
Q

How do you compile your code?

A

g++ nameOfFile.cpp

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

How do you execute your compiled program?

A

./a.out (computer language file)

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

How do you compile your code AND give it a name?

A

g++ nameOfFile.cpp -o newName

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

How do you write a single line comment?

A

with //followed by the comment you want to make.

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

How you you write a multi-line comment?

A

with:

/*followed by the comment
that you want to make and ending with */
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is a variable?

A

A name that represents a particular set of data set aside in the computers memory to store, use, and write data.

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

What kind of data do int variables hold?

A

ints hold integers

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

what does a single = sign mean in regards to variables?

A

the “=” sign does not mean equal to but instead, you are assigning a variable with it.

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