stud
bud
Sign up
Log in
Home
Library
Explore
SAT
More
C++ for Beginners Flashcards | StudBud
Explore
/
C++ for Beginners
C++ for Beginners
18 terms
·
StudBud Administration
·
121 plays
A short quiz about introductory concepts in programming with C++
Flashcards
18 cards
F
Practice quiz
P
Host live
L
Questions
18
Answers
1
Which of the following is a valid comment in C++?
**this is a comment
*/this is a comment
//this is a comment
**this is a comment
2
Which of the following is a valid name for a variable?
amountSold
amount-sold
1stQtrAmountSold
_amountSold
3
How many values can a memory location store at one time?
depends on the memory of the computer
only one
infinite
one byte per character
4
The .cpp file that contains your original C++ instructions is called the _________ file.
source
executable
object
document
5
Which of the following statements advances the cursor to the next line of the monitor?
cout << newline;
cout << endline;
cout << endl;
cout << "\n";
6
The _____ object, together with the << operator, is used to output values/print text:
cout
output
cin
print
7
Which of the following is equivalent to the
rate = rate / 100;
statement?
rate = rate /= 100;
rate /= 100;
rate =/ 100;
rate %= 100;
8
The rules you must follow when using a programming language are called its _________.
syntax
procedures
guidelines
regulations
9
Which of the following creates a variable that can store whole numbers only?
int numItems = “0”;
integer numItems = 0;
int numItems = ‘0’;
int numItems = 0;
10
Names of variables and named constants are case sensitive.
True
False
11
You create a
statement block
by enclosing one or more statements in _______.
quotation marks “ “
braces { }
parenthesis ( )
square brackets [ ]
12
What is optional when using an if statement?
false path
condition
true path
the word IF
13
What is the
arithmetic assignment operator
for addition?
+=
++
+
=+
14
A C++ statement must end with a __________.
nothing
colon :
semi-colon ;
exclamation point !
15
Which of the following is the equality operator in C++?
?=
!=
=
==
16
Which of the following is the inequality operator in C++?
x=
<>
==
!=
17
Which of the following stores the value entered at the keyboard in a variable named grossPay?
cout >> grossPay;
cin << grossPay;
cout <<grossPay;
cin >> grossPay;
18
A data type which consists of a number with decimal places
String
char
double
int