C++ Flashcards
(8 cards)
1
Q
How do you compile your code?
A
g++ nameOfFile.cpp
2
Q
How do you execute your compiled program?
A
./a.out (computer language file)
3
Q
How do you compile your code AND give it a name?
A
g++ nameOfFile.cpp -o newName
4
Q
How do you write a single line comment?
A
with //followed by the comment you want to make.
5
Q
How you you write a multi-line comment?
A
with:
/*followed by the comment that you want to make and ending with */
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.
7
Q
What kind of data do int variables hold?
A
ints hold integers
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.