C++ Functions

The C++ functions are user-defined named block of code that performs a specific task. The function takes parameter or no parameters, it may return a value or not return anything. Every function has a type that indicates the return type of that function. The main() is a function in C++ program and there could only … Read more

C++ Breaking Control Statements

There are three ways to break a control statement – break, continue and goto statements. In this article, you will learn about these statements in detail. A control statement executes all statements within its own block, but sometimes it wants to stop and exit the block. In these cases, we introduce a breaking statement. Three … Read more

C++ Do-While Loop

The do-while is another type of loop supported by C++ language. In the case of while loop and for loop – three expressions are compulsory. This is also true for do-while, but in a different way. do-while Loop Structure The do part allow the code block to execute first and then the while part perform … Read more

C++ while Loop

A while loop is another kind of loop control structure. The loop has initial condition and a test condition to pass before the actual loop body starts. The loop is incremented or decremented inside of the loop body. The general structure of while loop is given below. The initial expression is a simple assignment where … Read more

C++ switch-case Statements

The switch-case statements are similar to if-else-if construct – a multiple decision maker. It allows you to choose a constant (a switch) that matches with a case (constant) and executes all statements that follow the matched case. The main difference between if-else-if construct and switch-case is that the if-else-if uses multiple conditions at each level. … Read more

C++ if-else Statements

The if-else statement is a conditional statement with an optional else. The if statement executes a block of statements is the condition is true, but does not do anything when condition is false. The if-else block contains code for both true and false conditions. Each of the block in if-else construct will be enclosed using … Read more

C++ If Statements

The C++ If statement is a conditional statement. The program executes a block of code only if condition is satisfied or true. This changes the flow of C++ program. The program executes only required blocks and ignore others. There are two ways to write an if statement. With curly braces Write without curly braces( { … Read more

C++ Bit Format Flags

The C++ bit format flags changes the characteristics of .The flags hold the current setting for the . We can turn the flags on or off using built-in function such as or . Changing the behavior of the object is useful in displaying output only after bit level manipulation. Here is the list of flags … Read more

C++ Manipulators

The C++ manipulators are stream functions that modify the characteristics of input and output stream. It is used for formating the input and output stream by changing format flags and values for the stream. The list of manipulator function is located in header file. You need to include this header to use the manipulator functions … Read more

C++ I/O Stream

In C language, the input and output operations are performed using built-in library functions such as printf() and scanf(). But, C++ uses a new method of standard input and output called I/O stream. A stream is a  bytes of characters from memory to display on screen or read from the keyboard to the computer memory. … Read more

Ads Blocker Image Powered by Code Help Pro

Ads Blocker Detected!!!

We have detected that you are using extensions to block ads. Please support us by disabling these ads blocker.