Type qualifiers are key words that express extra information about the variable.for example
int a
long int a
const long int a
here long and const are type qualifiers.
Q2 . What are storage class specifiers in C++?
SOLUTION
The storage class specifiers define as to how a variable is defined and where it can be accessed in a program in short the scope.some storage class specifiers are extern,static,register.
>extern creates a global variable that can be accessed by all p
Q3 . what are pointers in C++?
SOLUTION
Pointer are variables that store the address of another variable.let us consider that
int *a;
a=&k;
a is pointer that has the address of the variable K.
Q4 . what are Classes in C++?
SOLUTION
C++ are complex or user defined data types that consist of variables and functions with varying levels of access using keywords or access specifiers like public,private or protected to regulate the data accesablility.
Q5 . what are OOPs concepts in C++?
SOLUTION
The object oriented programming that can be used in C++ are .
>Abstraction
>Encapsulation
>inheritance
>polymorphism
Q6 . How is Data hiding implemented in C++?
SOLUTION
We can use various access specifiers like private or protected to hide the data from unwanted access.
>private keyword gives access of the data only to its members
> protected only gives the access to its inherited classes.
Q7 . How is inheritance Implemented in C++?
SOLUTION
Inheritance is accessing the elements of a parent class in its child class.let us take a sample code for example
> class childclass: parentclass.
>now in the above statement all the elements from the parent class will b
Q8 . How is exception handling done in C++?
SOLUTION
Exception handling can be done using the try catch block.
>try is used to enclose the error prone block
throw is used to throw the error
catch is used to catch the error.
Q9 . How are dynamic memory allocated in C++?
SOLUTION
We can allocate memory dynamically in C++ using the new operator.for example
int *k;
k= new int [10];
Q10 . What are templates in C++?
SOLUTION
Templates help in using the same set of data as the ones with various other data types.
template dataTYPE func( dataTYPE a, dataTYPE b){}
the above is a function that take parameters of the datatype and return the same.