WorksheetsQuiz 1
Total questions: 15
Worksheet time: 6mins
Who invented C++?
Dennis Ritchie
Ken Thompson
Brian Kernighan
Bjarne Stroustrup
What is C++?
C++ is an object oriented programming language
C++ is a procedural programming language
C++ supports both procedural and object oriented programming language
C++ is a functional programming language
Which of the following is a correct identifier in C++?
VAR_1234
$var_name
7VARNAME
7var_name
Which of the following type is provided by C++ but not C?
double
float
int
bool
What is the value of p in the following C++ code snippet?
12
0
2
16
Which of the following is used to terminate the function declaration in C++?
;
]
)
:
Which concept allows you to reuse the written code in C++?
Inheritance
Polymorphism
Abstraction
Encapsulation
How are the constants declared?
const keyword
#define preprocessor
both const keyword and #define preprocessor
$define
What will be the output of the following C++ code?
5
6
Error
8
The value 132.54 can be represented using which data type?
double
void
int
bool
What will be the output of the following C++ code?
12.5664
13.5664
10
15
Regarding the following statement which of the statements is true?
const int a = 100;
Declares a variable a with 100 as its initial value
Declares a construction a with 100 as its initial value
Declares a constant a whose value will be 100
Constructs an integer type variable with an as identifier and 100 as the value
5 + 7 =
(a)
3.7 + 8.0 =
(a)
5 + 8.0 =
(a)
