C++ Multidimensional Arrays

A C++ multidimensional array has more dimensions identified by the number of subscripts. In this article, you will learn about a two-dimensional array in detail.Two-dimensional ArrayA two-dimensional array has rows and columns. The horizontal arrangement of elements within a two-dimensional array is row and vertical arrangement is a column.For example,A[2][4] means that this two-dimensional element … Read more

C++ One-Dimensional Arrays

One dimensional array are the simplest form of an array in C++ language. You can easily declare, initialize, and manipulate a one-dimensional array. A one-dimensional array can be a parameter for function and so on. You can treat individual array element like any other C++ variables.1-D Array DeclarationThe syntax to declare a one-dimensional array is … Read more

C++ Arrays

The C++ arrays are a collection of data objects of the same type that are stored in consecutive memory locations under a common name (array name).The array elements are indicated with a subscript called the index value. Using the index we can access an array element just like any variable.In the following section, you will … Read more

C++ Local Functions

A function is declared globally above the main function, or within the main function. You can also declare a function inside another function in C++. In this article, you will learn to declare, define and call a local function.Local Function DeclarationLike every other function, a local function must be declared within the body of another … Read more

C++ Storage Classes

The C++ variables are divided into 4 major storage classes which can change the scope/lifetime of the variables. In this article, you will learn about C++ storage classes with examples.The C++ storage classes are the same as the C programming language. Here is the list of storage classes. Automatic Storage class Register Storage Static Storage … Read more

C++ Global vs. Local Variable

The C++ programming language have scope set for variables depending on where it is declared. You can use variable with global scope anywhere in the program. The variable with local scope has limited scope. In this article, we will understand the difference between them and how to use them.Global VariableA global variable is not a … Read more

C++ Function Types

The C++ functions are of many types, but we broadly classify them into four categories – functions that return a value, function that does not return a value, function with parameters, and function without parameter. You many find functions that fall under more than one categories.In this article, you will learn about function each of … Read more

C++ Functions

The C++ functions are user-defined named block of code that performs a specific task. The function takes parameter or no parameters, it may return a value or not return anything. Every function has a type that indicates the return type of that function.The main() is a function in C++ program and there could only be … Read more

C++ Breaking Control Statements

There are three ways to break a control statement – break, continue and goto statements. In this article, you will learn about these statements in detail.A control statement executes all statements within its own block, but sometimes it wants to stop and exit the block. In these cases, we introduce a breaking statement.Three keywords are … Read more

C++ Do-While Loop

The do-while is another type of loop supported by C++ language. In the case of while loop and for loop – three expressions are compulsory. This is also true for do-while, but in a different way.do-while Loop StructureThe do part allow the code block to execute first and then the while part perform a test … Read more

Ads Blocker Detected!!!

We have detected that you are using extensions to block ads. Please support us by disabling these ads blocker.

Exit mobile version