KyaPoocha.com

Huge Collection of Interview Questions


‘C/C++ Interview Questions’ - KyaPoocha.com

What do you mean by Stack unwinding? 

It is a process during exception handling when the destructor is called for all local objects in the stack between the place where the exception was thrown and where... Read more »

What is a dangling pointer? 

A dangling pointer arises when you use the address of an object after its lifetime is over. This may occur in situations like returning addresses of the automatic... Read more »

What is an Iterator class? 

A class that is used to traverse through the objects maintained by a container class. There are five categories of iterators: input iterators, output iterators,... Read more »

What problem does the namespace feature solve? 

Multiple providers of libraries might use common global identifiers causing a name collision when an application tries to link with two or more such libraries. The... Read more »

What is Memory alignment?? 

The term alignment primarily means the tendency of an address pointer value to be a multiple of some power of two. So a pointer with two byte alignment has a zero... Read more »

What is pure virtual function? or What is abstract class? 

When you define only function prototype in a base class without and do the complete implementation in derived class. This base class is called abstract class and... Read more »

When are temporary variables created by C++ compiler? 

Provided that function parameter is a “const reference”, compiler generates temporary variable in following 2 ways. a) The actual argument is the correct... Read more »

When do use “const” reference arguments in function? 

a) Using const protects you against programming errors that inadvertently alter data. b) Using const allows function to process both const and non-const actual arguments,... Read more »

What are storage qualifiers in C++ ? 

They are.. const volatile mutable Const keyword indicates that memory once initialized, should not be altered by a program. volatile keyword indicates that the value... Read more »

What are C++ storage classes? 

auto register static extern auto: the default. Variables are automatically created and initialized when they are defined and are destroyed at the end of the block... Read more »

What is difference between template and macro?? 

There is no way for the compiler to verify that the macro parameters are of compatible types. The macro is expanded without any special type checking. If macro parameter... Read more »

What is conversion operator? 

Class can have a public method for specific data type conversions. for example: class Boo { double value; public: Boo(int i ) operator double() { return value; } }; Boo... Read more »

What is conversion constructor? 

Constructor with a single argument makes that constructor as conversion ctor and it can be used for type conversion. for example: class Boo { public: Boo( int i... Read more »

What is assignment operator? 

Default assignment operator handles assigning one object to another of the same class. Member to member copy (shallow copy)  Read more »

When are copy constructors called? 

Copy constructors are called in following cases: a) when a function returns an object of that class by value b) when the object of that class is passed by value... Read more »

Page 3 of 14«12345»...Last »