Home / C++ (page 3)

C++

Bubble Sort in C++ with examples

Bubble Sort C++

we will see the working and operations of bubble sort in C++ with proper examples by the sorting of arrays. Sorting of Arrays:- The process of arranging the arrays in some order is called sorting of arrays. There are two types of orders first one is ascending order and the …

Read More »

Two Dimensional Arrays in C++ with examples

Two dimensional arrays in C++

In C++ Two Dimensional array in C++ is an array that consists of more than one rows and more than one column. In 2-D array each element is refer by two indexes. Elements stored in these Arrays in the form of matrices. The first index shows a row of the …

Read More »

Binary Search in C++ with examples

Binary Search in C++

Binary Search:- The flaw of a binary search is that it could only be applied on a sorted array. We cannot apply it on an unsorted array. This is a very useful technique because it is used to quickly found the required values. This technique is performed is several steps. …

Read More »

Functions in C++ with examples

Functions in C++

A Functions in C++ is known as the block which contains a set of statements, which are executed when it is called in a Main method. In C++ they are defined by a unique name, these are the building blocks of the programming languages. They are used to encapsulate the …

Read More »

Arrays in C++ with examples

Arrays in C++:- In C++ programming, Arrays are the collection of the consecutive memory locations with same name and similar address in a free store or heap. These collections of consecutive memory locations with similar name and address are called Arrays. Types of Arrays:- There are mainly two types which …

Read More »

Array of Strings in C++ with examples

Array of strings in C++

What are Strings:- The collection of the alphabets is called string. For Example:- 1. “London”. 2. “Austria”. 3. “Football”. 4. “Stadium “. Array of strings:- It contains a complete string at each index. In case of a Two-Dimensional array each complete string is stored in a unique row. Types of …

Read More »

Functions and Arrays in C++ with examples

Functions and arrays in C++

We can pass Arrays to the Functions as parameters. When we pass parameter to the calling function then only the address of first index of the array is passed. One should always remember that the Arrays are always passed by reference not by value, which means when we pass it, …

Read More »

Sequential Search in C++ with examples

Sequential search in C++

Searching in Arrays:- The process of finding the required data in an array is called searching. It is very useful when the size of an array is very large. Normally, there are two types of searching techniques used in C++. 1. Sequential search. 2. Binary search.   Sequential Search:- Sequential …

Read More »

Continue, Break and Goto Statements in C++ with examples

Statements of C++ Programming:- Following statements are used in C++, normally inside the loops. 1. Continue Statement. 2. Break Statement. 3. Goto Statement. Continue Statement:- Continue statement is used inside the loop when we normally there is no need to display the specific output until the condition remains true. This …

Read More »

Pointers in C++ with examples

Pointers in C++

The pointers in C++ are simple variables which is declared by using the asterisk sign before the variable. It is used to store the memory addresses of data members and arrays of different data types. The reference operator is used to access the address of a variable which is assigned …

Read More »