Showing posts with label cpp. Show all posts
Showing posts with label cpp. Show all posts

Variable scope C++


Variable scope C++
Variable Scope In programming, scope of variable means the boundary of code within which the variable can be accessed. It is the visibility of variable. Ther…
Read more »

What is header file in C/C++


What is header file in C/C++
Header File Header file in c is a separate file with .h extension. Header file contains functions used by different source file commonly. Its advantage is re-u…
Read more »

What is function in c++


What is function in c++
Function in c++ A function in C/C++ is a separate block of code which only runs when it is called. A function is called by its name. Function is written to p…
Read more »

Array in c programming


Array in c programming
Why we need array in C++ Suppose you have to calculate average of four numbers. What will you do? You will declare four int variables to store four numbers, th…
Read more »

For loop in C++


For loop in C++
for loop Loop is used when we need to execute a code block multiple times. For loop in C/C++ is very specialized while loop. What is loop? Loop as for loop is …
Read more »

Do while loop in C++


Do while loop in C++
Why we need do while loop We have seen that there may be certain situations when the body of while loop does not execute even a single time. It happens when co…
Read more »

While loop in c


While loop in c
Loop in C++ A loop in programming languages is used to repeatedly execute a statement(s) as long as a given condition is true. In C++, three types of loops are…
Read more »

What is switch statement in C++


What is switch statement in C++
Switch Statement In switch statement, first expression inside parenthesis is evaluated and its value is compared with different switch cases inside switch body…
Read more »

If else statement


If else statement
If else Statement In if statement, body code is executed only if condition is true. However, no code is executed when condition is false. For this C++ provide …
Read more »

If statement in C++


If statement in C++
If Statement In C/C++, statement is used to execute a particular block of code if a certain condition is true. Three types of statements are used in C/C++  If …
Read more »

String in c


String in c
String A string in c/c++ is a variable used to store text string surrounded by double quote (“).  Write a C++ Program to cover following concepts of C++ strin…
Read more »

Logical operator in C++


Logical operator in C++
Logical Operators Using conditional operators we can check single condition whether true or false. If there are multiple conditions (compound condition) than l…
Read more »

Ternary operator OR Conditional operators in C++


Ternary operator OR Conditional operators in C++
Ternary Operators Ternary operators are also called conditional operators or comparison operators or relational operators. These operators are used to check wh…
Read more »