R4R
Right Place For Right Person TM
R4R C++

 


Totel:235 Click: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47

C++ Interview Questions And Answers

Page 9

Questions 41 
What is the difference between a pointer and a reference?

Answer
diff are there : >References are aliases to variables , or we can say other name to a given variable, Even pointer holds the address of a particular variable. > A Reference can be thought of as a special type of pointer with certain restrictions. > We can create the array of Pointer but its not in case of reference. > We can use pointer to pointer but we cnt us reference to referece. > We can assign NULL to the pointer but in refencer we can't. > References have to be initialised at the time of declaration and cannot be changed in the code later , whereas this does'nt hold true with the pointer.

Questions 42 What is Smart Pointer?

Answer
Its a bassicallly a objects which is store pointers to dynamically allocated objects. These pointers are seen as owning the object pointed to, And thus responsible for deletion of the object when it is no longer needed.smart pointer is an abstract data type that simulates a pointer while providing additional features.

Questions 43 
What is Operator overloading?

Answer
When an operator is overloaded, it takes on an additional meaning relative to a certain class. But it can still retain all of its old meanings. Examples: 1) The operators >> and << may be used for I/O operations because in the header, they are overloaded. 2) In a stack class it is possible to overload the + operator so that it appends the contents of one stack to the contents of another. But the + operator still retains its original meaning relative to other types of data.

Questions 44 
What is the difference between run time binding and compile time binding?

Answer
Dynamic Binding:This is also known as "Late Binding".The address of the functions are determined at runtime rather than at compile time. Static Binding:This is also known as "Early Binding" .The address of the functions are determined at compile time rather than at run time.

Answer
Dynamic Binding:This is also known as "Late Binding".The address of the functions are determined at runtime rather than at compile time. Static Binding:This is also known as "Early Binding" .The address of the functions are determined at compile time rather than at run time.

Questions 45 What is Difference Between C/C++

Answer
In C passing value to a function is "Call by Value" whereas in C++ its "Call by Reference" 2.C does not have a class/object concept. C++ provides data abstraction, data encapsulation, Inheritance and Polymorphism. 3.C++ supports all C syntax. File extension is .c in C while .cpp in C++.(C++ compiler compiles the files with .c extension but C compiler can not!) 4.In C structures can not have contain functions declarations. In C++ structures are like classes, so declaring functions is legal and allowed. C++ can have inline/virtual functions for the classes. c++ is C with Classes hence C++ while in c the closest u can get to an User defined data type is struct and union.


Goto Page:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
Share |

CPP Objective Questions And Answers

CPP Objective Questions And Answers

CPP Interview Questions And Answers

CPP Interview Questions And Answers


R4R,CPP Objective, CPP Subjective, CPP Interview Questions And Answers,CPP,CPP Interview,CPP Questions ,CPP Answers

New Updates

R4R
R4R
R4R
R4R
R4R
R4R
R4R
R4R