C for loop

It is an entry-control loop. For loops work like the corresponding while loop that it will execute a block of the statement until the specified condition returns false.It has three computing steps: The first is the initialization of the counter variable. The …

Read moreC for loop

C do while loop

This is equivalent to a while loop, but it has test condition at the end of the loop. It is an exit-control loop. The Do while loop will always execute at least once during the execution of a program. And it keeps …

Read moreC do while loop

C nested if statement

Nested if statements play an important role in C programming, it means you can use conditional statements inside another conditional statement. Structure of nested if

Example: The following result is:-

C if statement

An if statement contains a Boolean expression and block of statements enclosed within. Among the decision making statements, it is the most simple one. It checks if the condition is true or not, and if it is true then it executes …

Read moreC if statement

C Program Structure

Programs are a sequence of instructions or statements. These statements form the structure of a C program. The C program structure is divided into various sections. C Program Structure basically consists of the following parts: Preprocessor Commands/ headers Functions/ member …

Read moreC Program Structure

C Variables

A variable in C is nothing but a name given to a storage area that our programs can manipulate. This location is used to hold the value of the variable, which determines the size and layout of the variable’s memory. …

Read moreC Variables