Double dimension arrays store variable in a rows*columns size matrix. We input them using nested for loops which basically means one for loop inside another. Here i make use of logical AND operator...
Functions
The use of functions in C++ is when we have to run the same bit of code multiple times so instead we declare a function and call it any time we have to run the code.A function has 3 parts:prototype...
Inputting and outputting Strings
A string is basicallly a character array, it is written in double quotes.The end of the string is represented by \0.We can input a string by inputting it character by character or straight using ci...
Array
An array in C++ is like a sequence of variables.Arrays have 0 based indexing which means the first element is stored in 0th place and last at size-1th place.array_name[index] gives the element at ...
While and do while loop
In while and do while there is only one statement in the brackets next to while ,a condiitonal statement, which specifies when the loop ends.The difference is that in while loop first the condition...
For loop
There are three commands in for loop first setting the loop variable to an initial value,the second is a logical operation which specifies when the loop ends and the third is changing the value of ...
Pre and post increment
Both the pre(++a) and post increment(a++) in C++ means a=a+1; basically increasing the value of the variable by one but the difference between them is that in pre increment first value of a is inc...
Making a basic calculator using Switch
Switch in C++ is basically like a menu.If the variable in the switch bracket is equal to the any case then the code in that specific case and subsequent cases gets executed until it encounters a br...
If and Else
The way if works in C++ is that we put a condition in bracket if that is satisfied the code in if executes otherwise if else is there its code executes.If there is no else present then nothing hap...
Basic Arithematic operations in C++
There are 5 basic arithematic operations in C++: +: add -: subtract *: multiply /: divide. Note: The second operand should not be zero and if both the operands are int then answer will ro...