Functions Overview Function is a basic building block of a C program. Any C program can be assumed as a collection of several functions. Function is a block of code which has some name for identification. Key points about function
goto statement
goto statement The goto statement is used for unconditional jump from one part of the program to another part of the program. It is always suggested not to use goto statement as this reduces the readability of the program. Use
switch case control
switch case control instruction We studied earlier in decision control that how and when to use if, if-else. They are good enough to select one from the two available options. When choices are two, we can use if-else. Even if
Keyword continue
The keyword continue The keyword continue is used only in the body of loop. It is used to move control at termination condition in the case of while and do-while loop. continue is used in for loop to transfer control
Keyword break
The keyword break The keyword break is used only in: In the body of loop In the body of switch The keyword break is used in the body of loop to terminate execution of loop before completion of normal life
Iterative Control Instruction (Loops)
Loops Iterative control instruction is also known as repetitive control instruction or loop. Sometimes it is desirable to executed same statement again and again. This can be done with the help of loops There are three ways to implement loops
Decision Control Instruction
Decision Control Instructions Decision control instruction is also known as selection control instruction. C language provides three ways to implement this instruction: if if else Conditional operator if Following is the syntax of if statement: int main() { ..… …..
Control Instruction
Control Instructions Program is a set of instructions. We know that each instruction of the program is executed by processor. Processor executes instructions one by one. Whatever we write in our program is executed in the same order as they
Assignment Operators
Assignment Operators Assignment operator is the most used operator in the expression. It is sometimes misinterpreted as equal to operators by beginners. Assignment operator is used to assign value to the variable. Assignment operator (=) It is a binary operator
Logical Operators
Logical Operators There are three logical operators in C language: ! Logical NOT && Logical AND || Logical OR Logical NOT Logical NOT operator is also a unary operator, as it requires only one operand. Operand is treated as either