C++ String Basics

C++ strings store textual information. The string variable has a sequence of characters enclosed by double quotes. In C++ string basics, we cover following topics. Types of strings How to initialise strings ? How to read input strings ? Types Of StringsA string is a character array terminated by a null (\0)character. The C++ language … Read more

C++ Integer Data Type

Data types describe the kind of data so that computer can store or manipulate them appropriately. This is the reason to declare a data type in C++ programming.Data types are also necessary because data items such as numbers are used in expressions. If there is a mismatch, for example – integer and real numbers – … Read more

C++ Program Structure

C++ is a very popular programming language. Every C++ program has a general structure that it must follow.Here is common structure of a C++ program.Header SectionThe header section is used for Including header files Declaring global variables Declaring functions Defining constants You can divide C++ functions into two categories – Builtin functions and User-defined functions. … Read more

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

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