Skip to content

Category Archives: C++

Array within a Structure A structure is a data type in C/C++ that allows a group of related variables to be treated as a single… Read More
Standard Output Stream(cout): The C++ cout statement is the instance of the ostream class. It is used to display output on the standard output device… Read More
Forward List is a sequence container that allows unidirectional sequential access to its data. It contains data of the same type. In STL, it has… Read More
Short-circuiting is one of the optimization steps of the compiler, in this step unnecessary calculation is avoided during the evaluation of an expression. Expression is… Read More
Range-Based ‘for’ loops have been included in the language since C++11. It automatically iterates (loops) over the iterable (container). This is very efficient when used… Read More
In C language, header files contain a set of predefined standard library functions. The .h is the extension of the header files in C and… Read More
Pointers: A pointer is a variable that holds memory address of another variable. A pointer needs to be de referenced with * operator to access… Read More
Nowadays Java and C++ programming languages are vastly used in competitive coding. Due to some awesome features, these two programming languages are widely used in… Read More
A macro is a piece of code in a program that is replaced by the value of the macro. Macro is defined by #define directive.… Read More
Range-based for loops is an upgraded version of for loops. It is quite similar to for loops which is use in Python. Range-based for loop… Read More
The std::is_trivially_assignable template of C++ STL is present in the <type_traits> header file. The std::is_trivally_assignable template of C++ STL is used to check whether a… Read More
The std::underlying_type template of C++ STL is present in the <type_traits> header file. The std::underlying_type template of C++ STL is used to get the underlying… Read More
The std::is_member_function_pointer template of C++ STL is present in the <type_traits> header file. The std::is_member_function_pointer template of C++ STL is used to check whether the… Read More
The std::remove_volatile template of C++ STL is present in the <type_traits> header file. The std::remove_volatile template of C++ STL is used to get the T… Read More
Given a vector V consisting of N integers and an element K, the task is to find the index of element K in the vector… Read More