WorksheetsC++ Basics
Total questions: 12
Worksheet time: 10mins
What is the type of the temp variable?
var temp = 14.55;
Double
Boolean
Integer
String
Fill in the blank to make the variable num a constant.
_______int num=2;
con
constant
const
constans
What is the output of this code?
int x = 16;
int y = 5;
cout<<(x/y);
3.2
3
error
4
Which operator is used to determine the remainder?
*
%
+
-
What is the alternative for x = x + 5?
x += 5;
x -= 4;
x = y + 5;
x=+5
What does <= mean?
less than
greater than
less than or equal to
greater than or equal to
What punctuation is used to signal the beginning and end of code blocks?
{ }
-> and <-
BEGIN and END
( and )
Which of the following is a correct comment?
*/ Comments */
** Comment **
/* Comment */
{ Comment }
Evaluate the following expressions to true or false
3!=4-1
true
False
iostream
Displays output from the screen and input from the keyboard
Has all the math equations
Counts the time
Checks if the code has a function
