Switch Statement in C++

Here is the code tutorial for the Switch Statement in C++ Read more of this post

Console Input in C++

The statement used for taking user input from the console is ‘cout’ statement. Read more of this post

Console Output in C++

The command used for outputting text to console is the ‘cout’ statement. It resides in the iostream.h header file within the std namespace. For now ignore the terms and just get familiar with the program below. Read more of this post

if/else if And if/else if/else Selection Structure

Continuing the previous post of Selection Structure, here I am going to advance the Selection structure by including if/else if and then if / else if /else constructs as well.

In simple if statement, a block of code may or may not get executed depending upon the condition set. In the if/else structure, choice is available between two code blocks, your program must execute one of the two code blocks, either within if or within the else construct.

You can also extend the if/else structure by using the if / else if construct. This allows you to specify multiple code blocks each with a condition that must evaluate to true or false. As soon as one of the conditions is satisfied, the code block is executed and rest of the blocks are all skipped. Read more of this post

Selection Structure – The if and if/else Statement

Any simple program usually consists of lines of code that are executed one after the other unconditionally. Take the example of following simple c++ program… Read more of this post

The Assignment Operator Plus Initilization

The assignment operator allows us to change the value of a modifiable data object (for beginning programmers this typically means a variable). It is associated with the concept of moving a value into the storage location (again usually a variable). Read more of this post

Expressions | Statements | Blocks

From a stylistic perspective, an expression is like a phrase; a statement is like a complete sentence; and a statement block is like a paragraph. For example, Read more of this post

First C++ Program

Let’s dive into programming world using a simple C++ program. Read more of this post

Follow

Get every new post delivered to your Inbox.