This quiz focuses on foundational C++ concepts, essential for the CPS 150 final exam. It covers keywords, identifiers, data types, syntax for comments and output operations, assessing readiness and deepening understanding of C++ programming.
Rate this question:
Rate this question:
Rate this question:
Rate this question:
Rate this question:
Rate this question:
Rate this question:
Rate this question:
Rate this question:
Rate this question:
Rate this question:
Rate this question:
Rate this question:
X = 15;
X = y;
15 = y;
Y = x;
Y = 15;
Rate this question:
+ and *
- and /
+ and /
+ and -
- and *
Rate this question:
Char
Double
Int
String
Bool
Rate this question:
Float and double
Int and int
Double and int
Char and float
Float and bool
Rate this question:
A
B
C
D
F
Rate this question:
A
B
C
D
F
Rate this question:
A
B
C
D
F
Rate this question:
\ \
/ /
!
*
(*
Rate this question:
For any value in number
For no value
For positive numbers
For even values
For negative values
Rate this question:
Relational
Logical (Boolean)
Neither
Rate this question:
(a+b) / c+d
A+b / c+d
A + (b/c) +d
A+b/(c+d)
(a+b) / (c+d)
Rate this question:
+
-
*
/
%
Rate this question:
'Sales' and 'sales' are considered different identifiers
An identifier cannot start with a digit
'the average' is a valid identifier
A keyword cannot be used as an identifier
An identifier must be declared by the programmer or in an #included library
Rate this question:
Ha Ha
Hee Hee
'Ha Ha' on one line followed by 'Hee Hee' on the next line
No output because there is a syntax error
No output, but there is no syntax error
Rate this question:
>
>=
=
Rate this question:
Relational
Logical (Boolean)
Neither
Rate this question:
Relational
Logical (Boolean)
Neither
Rate this question:
+
-
*
/
%
Rate this question:
15000
(15000
(15000 > income) && (income < 50000)
(15000 50000)
(15000 > income) || (income < 50000)
Rate this question:
1 + rand() / 6
6 + rand() / 1
6 + rand() % 1
1 + rand() % 6
(1 + rand()) / 6
Rate this question:
A variable declared in the main function has a definite value just by being declared (as in int x ;)
A variable can be given an initial value when declared, but it need not be done
A variable must be given an initial value when declared (as in int x(5) ;
All of the above
None of the above
Rate this question:
Relational
Logical (Boolean)
Neither
Rate this question:
Cout
Cout
Cout
All of the above
None of the above
Rate this question:
Cout
Cout >> "Welcome !" ;
Cin
Cout
Cin >> Welcome ! ;
Rate this question:
1
2
3
4
None of these
Rate this question:
The expression has the value true regardless if the value in ch
The expression has the value false regardless of the value in ch
The value of the expression cannot be determined unless we know the value in ch
The expression has a syntax error
The expression is valid, but it is NOT a Boolean expression
Rate this question:
A
B
C
D
F
Rate this question:
Relational
Logical (Boolean)
Neither
Rate this question:
15
17
19
20
21
Rate this question:
X / y
Static_cast(x / y)
Static_cast(x) / y
1.0 * (x / y)
(x / y) * 1.0
Rate this question:
The message 'Congratulations' is displayed regardless of the value in the variable 'average'
There is an empty (null) statement in this fragment
This fragment contains a syntax error so the program will not run
The if does not control the cout statement
The output from the fragment will not change if the == is replaced by !=
Rate this question:
Cout
Cout
Cout
Cout
Cout
Rate this question:
A
B
C
D
F
Rate this question:
Number
Integer
Main
Double
Single
Rate this question:
Quiz Review Timeline (Updated): Jul 30, 2024 +
Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.
Wait!
Here's an interesting quiz for you.