C++ Continue

C++ continue Statement The continue statement forces to iterate the loop instantly without executing the next statement of the loop. Sometimes it is required to skip certain test condition within the loop, in such case continue statement is applied. When continue statement is applied inside the nested loop, …

Read moreC++ Continue

C++ Goto

C++ goto Statement A goto statement is used to jump the flow of a sequence of program execution. It transfers the control to some other part of the program. The goto uses an identifier that encountered the control of program jumps to an identifier. …

Read moreC++ Goto

C++ For loop

C++ loop Statement C++ Loop statement allows us to repeat the execution of a statement or group of statements multiple times. The statement(s) repeat execution within loop until the condition of loop became false. There are three types of loops in …

Read moreC++ For loop

C++ | C Plus Plus While loop

C++ while Loop Statement The while loop is an iterative control statement. A while loop repeatedly executes loop’s statement(s) several times as a given condition is true. Execution of loop is terminated when the condition of while loop becomes false and execute code after the …

Read moreC++ | C Plus Plus While loop

C++ Do while loop

C++ do…while loop Statement A do…while loop is similar to a while loop, except that a do…while loop executes statement within do block first and then check the condition of while. It guaranteed to execute at least one time of statement. In do while loop, while statement …

Read moreC++ Do while loop

C++ Call by Value

C++ Function A function is a set of statements that executes a task. In C++, functions are categorized into two different categories on behalf of argument (parameter) pass. Function with parameter (return_type function_name(paramenter);) Function without parameter (return_type function_name();) Function which …

Read moreC++ Call by Value

C++ Call by Reference

In call by reference function, the action is performed over the actual value pass in the parameter. At the time of function call, we pass the address or reference of value. So that in the call by reference the actual value inside and outside the …

Read moreC++ Call by Reference

C++ Recursion Function

Recursion (recursive) function is such function which call itself again and again. A recursion function call takes within the same function. The condition where the recursive function terminates is called the base case.   Syntax: C++ Recursion Example


←Prev …

Read moreC++ Recursion Function

C++ Inline function

An inline function is a function that is elaborated in line when it is invoked. When an inline function is called, all the code of inline function gets inserted at the point of function call. It increases the execution time of the …

Read moreC++ Inline function

C++ Friend function

A friend function has the right to access all private and protected members of a class although it is defined outside that class’ scope. Syntax

C++ friend function Example


  C++ friend function in two different …

Read moreC++ Friend function

Single dimension array

C++ Array An array is a collection of data (elements) of the same data types. The elements of an array are allocated in contiguous memory allocation. Elements of the array are accessed through the index (indices) of that element.   Types of array Single …

Read moreSingle dimension array

Two dimension array

C++ Two dimension (2D) Array Two dimension (2D) array is an array of arrays. It is represented in the form of row and column. The elements of 2D array are accessed through the index of row and column. Declaration of 2D Array …

Read moreTwo dimension array

C++ String

A string is a collection of characters. C++ programming language supports both C string as well as standard C++ library string. In C++, string is an object of std::string class. C Style String The C style string of C language is also supported in …

Read moreC++ String

Single level Inheritance

Inheritance is a feature in which one class inherits the property of another class. A class which inherits the property is called a derived class or subclass or child class and from which derived class inherits property is called as a base class or parent class. Inheritance makes reusability of code, which …

Read moreSingle level Inheritance

Multilevel Inheritance

C++ Multilevel Inheritance Multilevel inheritance is such an inheritance in which a derived class is created from another derived class.   C++ Multilevel Inheritance Example In this example, a base class Student is inherited in a derive class Marks, and the …

Read moreMultilevel Inheritance

Multiple Inheritance

C++ Multiple Inheritance Multiple inheritance is such an inheritance in which a derived class inherits properties of more than one base class.   C++ Multiple Inheritance Example In this example, two base classes Square and Show are inherited in one derived …

Read moreMultiple Inheritance

Hierarchical Inheritance

C++ Hierarchical Inheritance Hierarchical inheritance inherits the property of one base class in more than one derived class.   C++ Hierarchical Inheritance Example


←Prev Next→

Hybrid Inheritance

C++ Hybrid Inheritance When more than one type of inheritance is combined in single inheritance is called as hybrid inheritance. C++ Hybrid Inheritance Example


←Prev Next→

C++ Polymorphism

Polymorphism is an important feature of object-oriented programming. Polymorphism refers to “one name” “multiple forms”. Polymorphism means a program contains the same function name performs different functionality. Polymorphism is classified into two types. These are: Compile time polymorphism Run time …

Read moreC++ Polymorphism

C++ Overloading

C++ Overloading is a condition when two or more members have the same name with different parameter type or a different number of parameter. C++ overloading is two types: Function overloading Operator overloading   C++ Function Overloading When two or …

Read moreC++ Overloading