Category: Fundamentals of C Plus Plus (C++)

Interested in learning C Programming? Click here...


introduction to Cpp 3

Introduction to C++ Programming

As the name suggest, C++ is a programming language based on C with some added features (represented by ++) which makes possible the creation of comparatively efficient programs. C++ programming inherits all the good features of C by filtering out some of the limitations of C. In addition, C++ programming also possesses some extremely new unique concepts which were not at all present in C. However, since C++ is based on C, it is extremely important to have a thorough knowledge of C. However, by chance you are not thorough with C Programming then you are strictly recommended to have...

sizeof operator in cpp 0

sizeof operator in C++

sizeof operator in C++ is an unary operator which can be used to find the size of the data-type or expression or a variable. It returns the size of the memory allocated (in Bytes) by the compiler. Lets say, we want to find the size of the memory allocated to the data-type int. We can find it by using sizeof operator as shown in the below code:

Output:

As you can see, the above code calculated the size of int data type and displayed the result in C++.


Structures in Cpp 0

Structures in C++

Structure is a data-type in which the individual elements can differ in data-type. Thus, a single structure might contain integer elements, floating-point elements and character elements. Pointers, arrays and other structures can also be included as elements within a structure. The individual structure elements are referred to as members. Defining of Structures in C++: In general terms, the composition of a structure can be defined as:

In the above declaration, storage-class is an optional storage-class specifier, struct ia a required keyword, tag is a name (i.e., identifier) that identifies structure of this type, and data-type 1, data-type 2, …,...

Arrays in Cpp 0

Arrays in C++

An array can be defined as a sequence of data in memory, wherein all the data are of the same type, and are placed in physically adjacent locations. An array is a group of elements that share a common name, and that are differentiated from one another by their positions within the array. For example, if we have five numbers, all of which are named as x, they may be listed as: The position of each of these elements can be indicated by means of a subscript as: x1 = 65 x2 = 33 x3 = 64 x4 = 88...