C++ Pointers

C++ Pointers are variables that store memory address of another variable. In C++ programming language, each variable that user declares, has a specific memory allocation. To access these memory locations programmers user pointers. The syntax for declaring a pointer is: Asterisk sign (*) represents the pointers. It is called the Deference operator. Here pointer_type is … Read more

C++ Structures

C++ Structures store variables having different data types. For instance, n C++ programming language, user sometimes faces a situation where he needs to store a collection of various types of data in a single entity. Arrays provide the functionality to store data having same data types. Whereas for saving data of different data types, Structures … Read more

C++ Strings

C++ Strings are of two types: C++ String class C-Style Character String C++ String class Strings is one of the most common data types used in C++ programming language. String type variables store characters in double quotes. They are objects of string class that is part of standard C++ library. In order to use string … Read more

C++ Arrays

C++ arrays store one or more than one element. An array contains a number of items. A single variable is used to define an array of multiple items. Each item in an array is called an element. The image below shows an array that has 10 elements. Hence the length of array is 10. The … Read more

C++ Loops

Loops Quite often there comes a situation when a programmer needs to repeat a piece of code multiple times. Why is Repetition Needed? Repetition provides following purposes: Duplication Taking input, sum, and average of multiple numbers using a limited number of variables For example, to add five numbers we may have two different algorithms: Declare … Read more

C++ Constants

Constants C++ Constants are actually like fixed variables. Their value is declared in the beginning and cannot be altered afterward. In the C++ programming language, Constants are basically fixed values. These values are unchangeable throughout the program. These are also called Literals. C++ Constants Data types C++ constants have the same data types as C++ … Read more

C++ Code Structure

For understanding the structure of the C++ code, first consider the following snapshot of the code. Output: Hello World The code consists of seven lines.  Each line of the code is called statement of expression. Each C++ statement ends with semicolon(;). We explain each statement of the code. #include <iostream.h>; The first line is #include <iostream.h>;. … Read more

C++ Overview

This tutorial has been prepared for all types of learners whether they are a novice and want to start from scratch or for those who want to learn advanced concepts in C++. In this tutorial, it has been considered that the reader has knowledge about computer programs and programming languages.  If you are not aware … Read more