Arrays in C

Imagine that you have to store and later retrieve the unique ID of all of the registered voters in your city. Yes, you can create and name hundreds of thousands of distinct variable names to store the information. However, that would scatter hundreds of thousands of names all over memory. In addition, there is a … Read more

Nesting of Decision Making Statements in C

Nesting if statement means placing if statement inside another if statement. The general syntax of nesting if statement is as follows: if ( condition1 ) { statement1; if ( conditionA ) { statementA; } statement2; } This means if condition1 evaluates to True, then statement1 will be executed. After this, conditionA will be checked, if … Read more

goto Statement in C

The goto statement is used to unconditionally transfer the control to any location within the program whose address in the form of label follows the statement. It should be noted that break and continue statements transfer control to a fixed location; after loop body in case of break and to the condition of the while … Read more

continue Statement in C

The continue statement when encountered, transfers the control to the condition of the while loop or counter-modification statement of for loop. This means all the statements of loop body after the continue statement are skipped and the control is directly transferred to the condition of the while loop or counter-modification statement of for loop. Program … Read more

break Statement in C

The break statement is used to break the execution of body of loop. When this statement is encountered, the control is directly transferred to the statement immediately after the loop body. break is also used in switch-case statement to transfer the control of execution from the statements of some case to the statement immediately after … Read more

for Statement in C

The for loop is an entry-controlled loop (like while) in which first the condition is checked, and if it is True then the statements are executed. However, if the condition is False, the control will be transferred to the statement immediately after the body of loop. The condition can be any constant, variable or expression … Read more