Control Structures in C++

category:  Programming Fundamentals Table of Contents 1.Two-way Decision 2.Multi-way decision 2.1.Output of Program 2.2.Output of Program 3.Iterative Execution 4.Rules not the indentation 4.1.Alternative 1 4.2.Alternative 2 In the given example, if the tested expression is true, the statement 1 is executed. Otherwise, is not  executed and control will transfer the statement following the condition. The … Read more

First Program in C++

category:  Programming Fundamentals Table of Contents 1. 2.Things to Remember Our first C++ program is pretty simple. We will send a couple of instructions to the computer to print a message on the screen. It’s a very simple program but new programmers can learn some basic stuff that are necessary and are used in almost … Read more

Operators in C++

category:  Programming Fundamentals Table of Contents 1.Types of C++ Operators 1.1.Arithmetic Operators 1.1.1.Usage of Arithmetic operators 1.2.Relational Operators 1.2.1.Usage of Relational Operators 1.3.Logical Operators 1.3.1.For Example 1.4.Assignment Operators 2.Additional Operators in C++ 2.1.Conditional Operators 2.2.Increment and Decrement Operators 2.2.1.For Example 2.3.Bitwise Logical Operators 2.4.Sizeof Operator 3.C++ Operators Precedence and Associativity C++ is very rich in … Read more

Access Specifiers in C++

category:  Programming Fundamentals Table of Contents 1.Private 1.1.Program Example 2.Public 2.1.Program Example 2.2.Run Output 3.The use of specifiers As we know that there are three types of access specifier that is Private, Public and protected. we have discussed “Protected” access specifier here. Private The visibility of the Private access specifier is limited to only for … Read more

Classes in C++

category:  Programming Fundamentals Table of Contents 0.1.Program Example 0.2.Run output C++ is capable to provide not only the predefined classes but also the user-defined classes. Programmers can instantiate these classes any number of times. It contains two areas of declaration, one is called data member area and the other one is called the member function … Read more

Function Overloading in C++

category:  Programming Fundamentals Table of Contents 1.Function Overloading Program Example: 1.1.Run Output 2.Program Example: 2.1.Run Output 3.Program Example: 3.1.Run output “Overloading is the reuse of the same function name or symbol for two or more distinct functions or operations”. Function overloading is the general concept of c++. A function can be declared more than once … Read more

Inline Function Advantages

category:  Programming Fundamentals Table of Contents 1.When to use inline function: 2.  3.When not to use inline function: 3.1.Conclusion: When to use inline function: The inline function means expansion of a function call that is the function code is integrated (copy and paste) into the caller’s code. It is purely dependent on the compiler whether … Read more

Inline Functions in C++

category:  Programming Fundamentals Table of Contents 1.General Format of Inline Functions: 1.1.Program Example: 1.2.Run OutPut: Functions in “C” and “c++” programs are used to avoid repeated block of code. It also helps the programmer in readability and maintainability. As we also know that calling a function takes time when it jumps from the position in … Read more

One dimensional array in c++

category:  Programming Fundamentals Table of Contents 0.1.For Example: 0.2.For Example: The declaration of a one dimensional array is analogous to a variable declaration. The number of elements must be an integer. We must use an array to associate two or more memory cells with a unique name. In array declaration, we use the name to … Read more

Arrays in C++

category:  Programming Fundamentals Table of Contents 0.1.For Example: 0.2.For Example: 0.3.The Operation: 1.Array Bounds Checking: 1.1.[i]Run OutPut: “An array is a kind of data structure which allows a unique name to be given to a collection of numbered boxes or group of elements of the same type”. An individual element or box of an array … Read more