C++ Interview Questions
Questions Answers Views Company eMail

what is the virtual function overhead, and what is it used for ? i hope i can get and appropriate answers, thanks a lot....

6 9553

what is a ststic variable and stiticfunction briefly explain with exmple and in which case we use

HCL,

2 5955

What will happen when the following code is run: int x; while(x<100) { cout< 7 7568


In the following declaration of main, "int main(int argc, char *argv[])", to what does argv[0] usually correspond? 1) The first argument passed into the program 2) The program name 3) You can't define main like that

6 12533

What does the code "cout<<(0==0);" print? 1) 0 2) 1 3) Compiler error: Lvalue required

ISTS, Wipro,

15 19705

What is the output of the following code: int v() { int m=0; return m++; } int main() { cout< 4 7588


What is the correct syntax for inheritance? 1) class aclass : public superclass 2) class aclass inherit superclass 3) class aclass <-superclass

Wipro,

6 12792

What is the outcome of the line of code "cout<

TCS,

16 18508

What is Iteration Hierarchy? What is what is Object behavioral concept?

1 4776

Q1. A. What is unary operator? List out the different operators involved in the unary operator. B. What is an adjust field format flag? Q2. A. Distinguish between a # include and #define. B. Can a list of string be stored within a two dimensional array? Q3. A.Explain how a pointer to function can be declared in C++? B.List the merits and demerits of declaring a nested class in C++? Q4. A. What are the syntactic rules to be avoid ambiguity in multiple inheritence? B. Explain the operation of overloading of an assignment operator. Q5. A. Explain how the virtual base class is different from the conventional base classes of the opps. B. Explain how an exception handler is defined and invoked in a Program. Q6. A. What is a binary file? List the merits and demerits of the binary file usagein C++. B. Write short notes on Text Manipulation Routines. C. Write bites in Turbo c++ Header (“Include”) Files.

GE, Infosys, Microsoft, NIM,

2307

Find the second maximum in an array?

HCL,

12 22410

"How will you merge these two arrays? Write the program Array: A 1 18 22 43 Array: B 3 4 6 20 34 46 55 Output Array: C 1 3 4 6 18 20 22 34 43 46 55"

College School Exams Tests, HCL,

9 22038

what is the function of 'this' operator ?

Wipro,

7 25744

tell about copy constructor

Siemens,

3 6813

if u write a class do u write Assignment operator and copy constructor

Siemens,

1 5259


Un-Answered Questions { C++ }

What is the difference between abstraction and polymorphism?

609


What is vector processing?

660


given a set based questions and 5 questions based on it next data sufficiciency questions 2 and 2/3 english sentence completion with options very easy and 2 synononmys paragraph with 10 questions 10 minutes replace =,-,*,% with -,%,+,* type questions 5 3 questions lik following itssickhere itssickthere itssickhere istsickhere which is nt alike the others very easy

2141


When would you choose to return an error code rather than throw an exception?

533


How do you invoke a base member function from a derived class in which you have not overridden that function?

580






What is the difference between inheritance and polymorphism?

585


Is java as fast as c++?

595


what do you mean by exception handling in C++?

606


Which software is used for c++ programming?

610


What are the advantages/disadvantages of using #define?

567


What is a multimap c++?

669


what are the realtime excercises in C++?

2331


why is c++ called oops? Explain

578


What are the manipulators in c++?

545


What is the main purpose of inheritance law?

667