In C++, RTTI (Run-time type information) is available only for the classes which have at least one virtual function.
In C++, class variables are initialized in the same order as they appear in the class declaration.
Given a root of a tree, and an integer k. Print all the nodes which are at k distance from root.
In C printf(), %n is a special format specifier which instead of printing something causes printf() to load the variable pointed by the corresponding argument with a value equal to the number of characters that have been printed by printf() before the occurrence of %n.
Method 1 (Using Nested Loops) We can calculate power by using repeated addition.
Ideally delete operator should not be used for this pointer. However, if used, then following points must be considered.
In C++, delete operator should only be used either for the pointers pointing to the memory allocated using new operator or for a NULL pointer, and free() should only be used either for the pointers pointing to the memory allocated using malloc() or for a NULL pointer.
In C and C++, comma (,) can be used in two contexts:
Predict the output of following C programs.
Following are the differences between malloc() and operator new.
Predict the output of below C++ programs.