NEW
Font size
WorksheetsC++ Operator
Total questions: 30
Worksheet time: 20mins
What does <= mean?
less than
greater than
less than or equal to
greater than or equal to
What is the only function all C++ programs must contain?
start()
system()
main()
program()
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 }
What does <= mean?
less than
greater than
less than or equal to
greater than or equal to
y = 3;
x = 5 * y;
What is the output of this program?
#include <iostream>
using namespace std;
int main()
{
cout<<"Hi everybody";
return 0;
}
Which of the following is NOT a logical operator in C++ language?
&
&&
||
!
Which of the following is NOT a comparison operator in C++ language?
>
<=
=
==
c++ is an _____________ , developed by ______________ , and is an extension of c language
object oriented program , Bjarane
class and data
complier, interpreter
functions comments
computers work on instructions given to them in a specific language which is known as __________
programming language
bitcode
a program written in a high language is called a ____________
object
source code
variable
constant
_____ is an object oriented language
c++
compiler
programming
_________ in programming come into use when we need to repeatedly execute a block of statements.
nested for loop
none
for loop
loop
Two expressions can be compared using ___________ operator.
Logical
Relational
Arithmetic
______ is used to input value from the user.
cin>>
cin<<
<cin>
Which is one is relational operators?
<, >, <=, >=, ==, !=
+, -, *, /, %
=, +=, -=, *=, /=, %=
&&, ||, !
Which is one is assignment operators?
&&, ||, !
+, -, *, /, %
<, >, <=, >=, ==, !=
=, +=, -=, *=, /=, %=
What is the difference between double and float?
The byte size
Same, no difference
Decimals
Which library is used for input output in C++?
<stdio>
<stdlib>
<iostream>
<math>
What is the output of this code?
int x = 8;
// x = 3;
cout<<x<<endl;
3
8
error
x
What is the type of the temp variable?
var temp = 14.55;
Double
Boolean
Integer
String
iostream is used for?
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
