Note 1

Take Note:

Take a note while surfing.





Note With Ink

Give your Note a Colorful Tag.




Easy to Access

Stay on same information and in Sync wherever you are.

Note 2

Take Note:

Organize your information,It may take Shape.





Think With Ink

Differ your Content by Color.




Easy to Access

Easy to pull up your content from anywhere anytime.

Note 3

Take Note:

Don't Let information to miss,Because it take shape





Note With Ink

Simple an Easy Way to take a note.




Easy to Access

Get the same in next visit.

Technical Interview Questions and Answers :: C++

  • 1. Difference between realloc() and free()?
  • Answer:

    The free subroutine frees a block of memory previously allocated by the malloc subroutine. Undefined results occur if the Pointer parameter is not a valid pointer. If the Pointer parameter is a null value, no action will occur. The realloc subroutine changes the size of the block of memory pointed to by the Pointer parameter to the number of bytes specified by the Size parameter and returns a new pointer to the block. The pointer specified by the Pointer parameter must have been created with the malloc, calloc, or realloc subroutines and not been deallocated with the free or realloc subroutines. Undefined results occur if the Pointer parameter is not a valid pointer

    Please Login First :
    Tags:

    iGate 

  • 2. What do you mean by binding of data and functions?
  • Answer:

    Encapsulation.

    Please Login First :
    Tags:

    No Tags on this question yet!

  • 3. What is abstraction?
  • Answer:

    Abstraction is of the process of hiding unwanted details from the user.

    Please Login First :
    Tags:

    iGate Accenture 

  • 4. What is encapsulation?
  • Answer:

    Encapsulation is binding of attributes and behaviors. Hiding the actual implementation and exposing the functionality of any object. Encapsulation is the first step towards OOPS, is the procedure of covering up of data and functions into a single unit (called class). Its main aim is to protect the data from out side world.

    Please Login First :
    Tags:

    Wipro Tech Mahindra TCS iGate Accenture 

  • 5. What is the difference between an object and a class?
  • Answer:

    Classes and objects are separate but related concepts. Every object belongs to a class and every class contains one or more related objects.
    Ø A Class is static. All of the attributes of a class are fixed before, during, and after the execution of a program. The attributes of a class don't change.
    Ø The class to which an object belongs is also (usually) static. If a particular object belongs to a certain class at the time that it is created then it almost certainly will still belong to that class right up until the time that it is destroyed.
    Ø An Object on the other hand has a limited lifespan. Objects are created and eventually destroyed. Also during that lifetime, the attributes of the object may undergo significant change.

    Please Login First :
    Tags:

    iGate Accenture 

  • 6. What is polymorphism? Explain with an example?
  • Answer:

    No Discussion on this question yet!

    Please Login First :
    Tags:

    TCS iGate Accenture 

  • 7. What do you mean by inheritance?
  • Answer:

    No Discussion on this question yet!

    Please Login First :
    Tags:

    Aricent iGate Accenture 

  • 8. What is a scope resolution operator?
  • Answer:

    A scope resolution operator (::), can be used to define the member functions of a class outside the class.

    Please Login First :
    Tags:

    iGate Accenture 

  • 9. What is virtual functions, and explain with an example?
  • Answer:

    A virtual function allows derived classes to replace the implementation provided by the base class. The compiler makes sure the replacement is always called whenever the object in question is actually of the derived class, even if the object is accessed by a base pointer rather than a derived pointer. This allows algorithms in the base class to be replaced in the derived class, even if users don't know about the derived class.

    Please Login First :
    Tags:

    Aricent iGate Accenture 

  • 10. What is friend function?
  • Answer:

    As the name suggests, the function acts as a friend to a class. As a friend of a class, it can access its private and protected members. A friend function is not a member of the class. But it must be listed in the class definition.

    Please Login First :
    Tags:

    Aricent iGate Accenture 

You can check latest and updated C++ Developer Interview Questions and Answers on this page. You can filter the question set by the company's name. Looking for the right answer? Don't worry! You can click on view answer section and check the answer with the explanation. You can discuss the answer in the forum with other users easily. Login with Facebook and save the answer To Reading List right now!

Our site contains top IT companies placement paper and mock test to help the freshers and experienced candidate to get hands on experience on the pattern and type of questions. We have curated all the C++ technical interview questions and answers from previous candidates.