WorksheetsC++
Total questions: 10
Worksheet time: 10mins
Which of the following is the correct syntax of including a user defined header files in C++?
#include “userdefined”
#include [userdefined]
#include <userdefined>
#include <userdefined.h>
Which of the following is used for comments in C++?
// comment */
// comment
/* comment */
both // comment or /* comment */
Which function is used to write a single character to console in C++?
write(ch)
cout.put(ch)
printf(ch)
cout.putline(ch)
Which of the following is called insertion/put to operator?
>>
<
>
<<
Wrapping data and its related functionality into a single entity is known as _____________
Polymorphism
Abstraction
Encapsulation
Modularity
What does polymorphism in OOPs mean_____________.
Concept of hiding data
Concept of wrapping things into a single unit
Concept of allowing overiding of functions
Concept of keeping things in differnt modules/files
C++ is ______________
procedural programming language
object oriented programming language
functional programming language
both procedural and object oriented programming language
Which of the following is the correct syntax to print the message in C++ language?
cout <<"Hello world!";
Cout << Hello world! ;
Out <<"Hello world!;
Out <<"Hello world!::;
For inserting a new line in C++ program, which one of the following statements can be used?
\a
\r
\a a
\n
Which of the following statement is correct about the C++ programming language?
In C++, member function are allowed to be of the type canst
In C++, Dynamic checking is allowed
In C++, Static checking is allowed
In C++, both the Static and Dynamic type checking are allowed
