What is the use of ‘using’ declaration?
A using declaration makes it possible to use a name from a namespace without the scope operator. Read more »
A using declaration makes it possible to use a name from a namespace without the scope operator. Read more »
Constructor which initializes the it’s object member variables ( by shallow copying) with another object of the same class. If you don’t implement one in your... Read more »
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 »
Default assignment operator handles assigning one object to another of the same class. Member to member copy (shallow copy) Read more »
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 »
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 »
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 »
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 »
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 »
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 »
Provided that function parameter is a “const reference”, compiler generates temporary variable in following 2 ways. a) The actual argument is the correct type,... Read more »
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 »
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 »
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 »
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 »
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 »
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 »
The inline keyword tells the compiler to substitute the code within the function definition for every instance of a function call. However, substitution occurs only... Read more »
With the C++ language, you can overload functions and operators. Overloading is the practice of supplying more than one definition for a given function name in the... Read more »
To override a method, a subclass of the class that originally declared the method must declare a method with the same name, return type (or a subclass of that return... Read more »