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