91 C++ Interview Questions |
While different interviewers may ask distinctive questions, it always helps to be prepared for severe grilling. So we have to drawn up a list of frequently asked 91 C++ interview questions. Read all the questions and prepare answers dotted with examples for success in the job interview. - What is C++?
- What are the differences between C and C++?
- What is the difference between realloc() and free()?
- How do you find out if a linked-list has an end?
- What is function overloading and operator overloading?
- What are the advantages of inheritance?
- What is the difference between declaration and definition?
- How do you write a function that can reverse a linked-list?
- What do you mean by inline function?
- Write a short code using C++ to print out all odd number from 1 to 100 using a for loop
- Write a program that ask for user input from 5 to 9 then calculate the average
- What is public, protected, private?
- Tell how to check whether a linked list is circular.
- What is virtual constructors/destructors?
- What is the difference between declaration and definition?
- What is the difference between an ARRAY and a LIST?
- Does c++ support multilevel and multiple inheritance?
- Define a constructor?
- What is a template?
- What is the difference between class and structure?
- What is RTTI?
- What is encapsulation?
- What is an object?
- How can you tell what shell you are running on UNIX system?
- What do you mean by inheritance?
- Describe PRIVATE, PROTECTED and PUBLIC
- What is namespace?
- What is a COPY CONSTRUCTOR and when is it called?
- What is Boyce Codd Normal form?
- What is virtual class and friend class?
- What do you mean by binding of data and functions?
- What is the word you will use when defining a function in base class to allow this function to be a polimorphic function?
- What do you mean by binding of data and functions?
- What is the difference between an object and a class?
- What are 2 ways of exporting a function from a DLL?
- What is the difference between an object and a class?
- What is a class?
- What is friend function?
- What is abstraction?
- Which recursive sorting technique always makes recursive calls to sort subarrays that are about half size of the original array?
- What are virtual functions?
- What is the difference between an external iterator and an internal iterator? Describe an advantage of an external iterator?
- What do you mean by pure virtual functions?
- What is a scope resolution operator?
- What is polymorphism? Explain with an example?
- What’s the output of the following program? Why?
- Why are arrays usually processed with for loop?
- Explain which of the following declarations will compile and what will be constant - a pointer or the value pointed at: * const char * * char const * * char * const
- What problems might the following macro bring to the application?
- Anything wrong with this code? T *p = 0; delete p;
- How do you decide which integer type to use?
- What’s the auto keyword good for?
- What is the difference between char a[] = “string”; and char *p = “string”;?
- What can I safely assume about the initial values of variables which are not explicitly initialized?
- What does extern mean in a function declaration?
- How do I declare an array of N pointers to functions returning pointers to functions returning pointers to characters?
- How do I initialize a pointer to a function?
- How do you link a C++ program to C functions?
- How many ways are there to initialize an int with a constant?
- What are the differences between a C++ struct and C++ class?
- What is a default constructor?
- How does throwing and catching exceptions differ from using setjmp and longjmp?
- What is a conversion constructor?
- What is the difference between a copy constructor and an overloaded assignment operator?
- When should you use multiple inheritance?
- Explain the ISA and HASA class relationships. How would you implement each in a class design?
- When is a template a better solution than a base class?
- What is an explicit constructor?
- What is a mutable member?
- What is the Standard Template Library (STL)?
- What problem does the namespace feature solve?
- Describe run-time type identification
- Are there any new intrinsic (built-in) data types?
- What is the difference between Mutex and Binary semaphore?
- What methods can be overridden in Java?
- What are the defining traits of an object-oriented language?
- Write a program that ask for user input from 5 to 9 then calculate the average.
- What is the diffrence between a "assignment operator" and a "copy constructor"?
- What is RTTI?
- What are the types of STL containers?
- What is the need for a Virtual Destructor?
- What is "mutable"?
- What is a modifier?
- What is an accessor?
- Define namespace.
- When does a name clash occur?
- Differentiate between a template class and class template.
- What is an Iterator class?
- What is the use of ‘using’ declaration?
- What is a dangling pointer?
- What is an incomplete type?
|