- How many keywords are in C++? [63 keywords]
- What is reference variable in C++?
- C++ allow the declaration of variable anywhere in scope? [Yes]
- for(int i =0; i<10 i="" span="">10>
Is it a correct syntax in C++? [Yes]
- What are Tokens?
Ans: it is smallest unit of a program that contains keywords, identifiers, constants, operators all same as ‘C’.
- new or delete are Unary operator or Binary operator? [Unary Operator]
- What are manipulator?
Ans: Manipulators are used to format the display. endl and setw are manipulators.
- All basic control structure[if, if-else, loops, switch]are same as ‘C’ supports? [Yes]
- Return datatype of main( ) is? [int]
- Write down the name of two function in C++ and are not supported by ‘C’? [Friend and Virtual]
- What are member function and data member of a class?
Ans: Variables declare in a class are known as data members or function declared in class are known as member functions.
- What is default access modifier of data member of class? [private]
- What is Encapsulation?
Ans: Binding of data member and member function into a single unit is process of Encapsulation.
- Is member function of class can be declared outside the class? How?
Ans: Yes, they can be declared but with class name with they belong and scope resolution operator[::]
Eg: void student :: display( )
- What are Objects?
Ans: they are runtime entity that contains data members or member functions of the class with they belong.
- Describes the behavior of Access modifiers in Inheritance?
|Types of Inheritance||Private||Protected||Public|
|Class student: private person||X||Private||Private|
|Class student: protected person||X||Protected||Protected|
- ‘super’ keyword is allowed in C++? [No]
- Write down any 3 main difference between constructor destructor?
|1. It is called at the time of memory allocation.||1. It is called at time of memory de-allocation.|
|2. Constructors can be parameterized as well as non-parameterized also.||2. Destructor can`t be parameterized|
|3. Overloading of constructor is possible.||3. Overloading is not possible.|
- What is containership or nesting?
Ans: A class can contain objects of other classes this is known as containership or nesting.
- For what ‘this’ operator refers to?
Ans: A ‘this’ operator refers to an object that currently invokes a member function.
- What is type conversion?
Ans: A conversion of a value from one type to another.
- Define the scope of a variable?
Ans: the scope of variable is the portion of program where particular variable is accessible.
- What is Overloading?
Ans: the ability to change the definition of an inherited method in a subclass.
- What is pseudo code?
Ans: A code which is written in easy to read language without worrying about the syntaxes of language.
- What do you understand by executive file?
Ans: A file containing machine code that has been linked and is ready to be run on computer.
- What is hierarchy of class?
Ans: it is class networks, which consists of a base class and derived class.
- What is coding?
Ans: The act of writing a program in computer language.
- What is Bit?
Ans: A binary digit, either of digits 0 or 1.
- What is C++?
Ans: An object oriented language developed by BjarneStroustrup and it is successor of ‘C’.
- Why comments are made?
Ans: To make a program more readable.