NEW
Font size
WorksheetsC++ 1st ONLINE QUIZ
Total questions: 13
Worksheet time: 7mins
What is a correct syntax to output "Hello World" in C++?
Console.WriteLine("Hello World");
print("Hello World);
cout<<"Hello World");
System.out.println("Hello World");
C++ is an alias of C#
TRUE
FALSE
How do you insert COMMENTS in C++ code?
# This is a comment
/*This is a comment
//This is a comment
/*/This is a comment
Which data type is used to create a variable that should store text?
String
Char
Int
string
How do you create a variable with the numeric value 5?
int x = 5
double x = 5
num x = 5
x = 5
How do you create a variable with the floating number 2.8?
double x = 2.8;
int x = 2.8;
byte x = 2.8
x = 2.8
Which header file lets us work with input and output objects?
#include<stream>
#include<iosstream>
#include<inputstr>
#include<iostream>
Which operator can be used to compare two values?
<>
==
><
=
How do you start writing an if statement in C++?
if (x > y)
if x > y
if x > y then:
if (x > y);
To declare an character in C++, define the variable type with:
( )
[ ]
{ }
| |
How many Logical Operators we have in C++?
4
6
3
5
How many Arithmetic Operators we have in C++?
5
4
6
7
How many Comparison Operators we have in C++?
7
8
6
9
