1. Memory Address of a Variable
TheRAM(Random Access Memory) is the memory of a computer that can be read and changed in any order, typically used to store working data and machine codes. In some operations, we useROM(Read Only Memory), In our applications, we have a lot of variables and every variable stored in the RAM and it takes space in the memory, These variables…
Discover Goto and Labels in C++
April 14, 2021
Thegotostatement is used to jump to alabelthat provides an unconditional jump from the goto to a labeled statement in the same function. We can also do the same loops as the same in for() while() loops by using goto statement. Instead of goto we…
Learn To Use Arithmetics On Pointers In C++
April 12, 2021
In a previous post, we learned that pointers are variables to point address which is also an integer value. That means we can do arithmetic operations on a pointer variable. But do not forget that we operate on the addresses in our RAMs, so we should be careful and we should…
Learn To Use Break And Continue In Loops With C++
April 10, 2021
1. Using break in Loops
break statement is used to break code-block in case statements and it is also used to jump out of a loop. In an earlier post, we used break in switch() statements.
For example we can break for() loops, in this loop below we can break in some step before counting all range,
for( int a=0; a<=10; a++)
{
std::cout << a << ",";
…
Learn To Define And Use Arrays In C++
April 9, 2021
Arrays are used to define a data block in the memory with number of data types, like integer numbers, floating point numbers, characters, structures, … etc. C & C++ programming language provides this data structure, called as array that stores a fixed-size of…
Discover Switch Statements in C++
April 7, 2021
Another one of the most used logical operators in C++ is switch() statement. A switch statement allows you to check variable and you can branch to different cases in accordance with it’s value. Each cases can be defined for different values, and the variable being…
Discover If Statements and Conditions in C++
April 6, 2021
One of the important part in programming is logics in functions and main program. Each these conditions are important to decide how code flow will work in runtime. In programming we use conditions and if – else statements. In C++ if statements can be done in one line or multi lines and it supports the logical conditions as same as used in mathematics. Conditions are logical operators and…
Learn to Use While and Do-While Loops in C++
April 5, 2021
While loops allow you to repeat a block of code as long as your specified condition is reached. Loops are used very offend in programming because they save time, reduce errors, and they make code more readable.
1. The While Loop
In the mechanism of the while statement…
Learn How To Use Operators In C++
April 3, 2021
C Programming language is one of the oldest programming language. A lot of operands in other programming languages got inspiration from this language. C and C++ have the same operators and most of them are the same in other programming languages. In programming variable at…
Learn To Use For Loops In C++
April 2, 2021
In programming, one of the most used statement is for() loops. It is used to count in range with given conditions. If you know exactly how many times you want to execute a block of code in your loop, then they are very useful than other loops. Occasionally, it is used to calculate series in range or to list elements that have the number of elements (i.e. string lists, arrays, char arrays, vectors…