Tuesday 25 September 2012

some IMP Q in C++ interviewer point of view :

some IMP Q in C++ interviewer point of view :

Ques 1: - What is difference between visual c++ & ANSI c++ ?
Ans: -Visual C++ is probably the most popular favored compiler, because of it's history of quality and stablity.But in ANSI C++ is a less popular, but is a much more powerful and robust compiler. The IDE is also a lot more powerful than MSVC.

Ques 2: - When does a name clash occur in C++ ?
Ans: - A name clash occurs when a name is defined in more than one place. For example., two different class libraries could give two different classes the same name. If you try to use many class libraries at the same time, there is a fair chance that you will be unable to compile or link the program because of name clashes.

Ques 3: -What is the difference between "overloading" and "overriding" ?
Ans:- Overloading a method (or function) in C++ is the ability for functions of the same name to be defined as long as these methods have different signatures (different set of parameters). Method overriding is the ability of the inherited class rewriting the virtual method of the base class.overridding is run time polymorphism while overloading is compile time polymorphism.

Ques 4: - What is an accessor in C++ ?
Ans: - An accessor is a class operation that does not modify the state of an object in C++. The accessor functions need to be declared as const operations

Ques 5: - What does #include do ?
Ans: - This is a directive to the preprocessor, which runs when you call your compiler. This specific directive causes the file named after the word include to be read, as if it were typed in at that location in your source code.
 

No comments:

Post a Comment