C++ Interview Questions
Questions Answers Views Company eMail

when can we use virtual destructor?

HCL, HP, Virage Logic,

7 25621

What is the difference between Class and Structure?

HP, IBM, Samsung, TCS,

40 222329

What is size of null class?

HP,

6 16596

Is structure can be inherited?

HP, ST Micro,

5 16532

How the V-Table mechanism works?

HP,

6 22108

What is the STL?

Epson, HP,

2 8685

what is a template?

Amazon, BITS, IBS, Wipro,

2 8303

what is an algorithm in terms of STL?

Lucent, Wipro,

1 8026

What is the difference between public, private, protected inheritance?

Wipro,

12 59996

What is Virtual Inheritance?

Amazon, Wipro,

7 15885

What is the difference between operator new and the new operator?

Amazon, TCS, Wipro,

3 12159

What happens if an exception is throws from an, object's constructor and object's destructor?

Wipro,

4 16415

What is the difference between Pointer and a Reference? When you would use them?

Wipro,

4 12790

What are the differences between a struct in C and in C++?

Amazon, Wipro,

8 17026

What are the differences between a struct and a class in C++?

Amazon, Wipro,

7 12509


Un-Answered Questions { C++ }

write a code for this. serial_number contained in the header of the file will be read , if this serial number is less than a previous serial number within a successfully processed file, or is the same as another serial number within a successfully processed file, or if the field contains anything other than 7 digits, then the file must error with the reason ‘Invalid SERIAL_NUMBER’.

1972


class type to basic type conversion

2075


How should a contructor handle a failure?

901


Can you sort a set c++?

753


What does it mean to declare a member function as virtual?

783


Explain about Searching and sorting algorithms with complexities

768


What is the oops and benefits of oops programming?

725


What is the benefit of oop?

747


What is the outcome of cout< a) 16 b) 17 c) 16.5

770


In a function declaration what does extern means?

799


Is deconstructor overloading possible? If yes then explain and if no Then why?

802


What is a stl vector?

819


Discuss the role of C++ shorthands.

711


What is the difference between the functions memmove() and memcpy()?

853


Why are pointers not used in c++?

816