Author name: admin

Tutorials

C++ Continue Statement

C++ continue statement provides a way to instantly jump to the beginning of the loop for the next iteration. After continue statement, the control is immediately shifted to the beginning of the loop by ignoring followed statements.  It is mostly used within for, while, do-while loops or switch statements. Syntax: continue statement: Flow Chart: Continue … Read more

Tutorials

C++ Break Statement

C++ Break statement provides a way to instantly jump out of the loop. After the break statement, the control is immediately shifted to a statement just below the enclosing loop or switch. It is mostly used within for, while, do-while loops, or switch statements. Syntax: Break statement Flow Chart: Break Statement Example: Break statement Output … Read more

Tutorials

C++ do-while Loop

C++ do-while loop is used to execute one or more statements while the condition remains true. The major difference between a while loop and a do-while loop is: While the loop executes its statements after the condition if the condition becomes false at the beginning the loop is terminated. On the other hand, the do-while … Read more

Tutorials

C++ While Loop

C++ while loop is the simplest loop. It executed its statements repeatedly until the given condition remains true.  As the condition becomes false the while loop will be terminated and control goes to the statements just after the while loop. Syntax: while loop in C++ Working: while loop in C++ In a while loop, first … Read more

Tutorials

C++ For Loop

C++ for loop is used to repeat statements or a piece of code a specified number of times.  It works same as the working of the while loop but it is more flexible than that. That’s why it is the most frequently used loop than the other loops such as while or do-while loops. Syntax: … Read more

Tutorials

C++ Switch Statement

The C++ switch statement is a conditional statement like if-else. It is used to execute a specific choice from all available choices. The switch statement compares the result of a single expression with all available cases. If the result matches with any case, the relevant block of statements is executed. Syntax: Switch statement in C++ … Read more

if statement in cpp
Digital Trends, Tutorials

C++ If-else Statements

C++ If-else statements in c++ are the conditional statements. They are used to decide which part or code block of the program will be executed according to the pre-defined conditions true or false.  Relational operators are used to specify the conditions in c++. There are many ways to use if-else statements in C++ like if, … Read more

cpp-manipulators
Tutorials

C++ Manipulators

In this tutorial, you will learn about C++ Manipulators. They are used to styling output in various ways. This is the most common way to control the program output. There are many manipulators used in the c++ language like, endl, setw, Setprecision, Setfill, Showpoint, and fixed. Here we discuss them one by one. endl manipulator … Read more

cpp-inout-and-output
Tutorials

C++ Input / Output

C++ Input / Output are the two main features of the C++ programming language.  A standard input stream (cin) object is used to take input from the user.  The standard output stream (cout) object is used to print the output on the computer screen. The standard input/output stream (iostream) header file provides the definitions of … Read more

Tutorials

C++ Comments

C++ Comments are the non-executable line of code.  It is used by the programmer to make the code more readable for himself or for other programmers. It is written for the convenience of the programmer to make the code easier to understand. There are two types of comments Single Line Comment Multi-Line Comment Single Line … Read more

Scroll to Top