Input Output
getch() putch()
getche() putchar()
1.13 DECISION STATEMENTS
It checks the given condition and then executes its sub-block. The decision statement decides
the statement to be executed after the success or failure of a given condition.
Types:
1. If statement
2. If-else statement
3. Nested if-else statement
4. Break statement
5. Continue statement
6. Goto statement
7. Switch() statement
8. Nested switch ()case
9. Switch() case and Nested if
1.15 ARRAYS
It is a collection of similar data types in which each element is located in separate memory
locations.
Types
1. One dimensional array
2. Two dimensional arrays
3. Three or multi dimensional arrays
1.17 FUNCTIONS
It is a self-contained block or a sub program of one or more statements that performs a
special task.
Declaration of functions
Function_name (argument/parameter)
Argument declaration;
{
Local variable declaration;
Statement1;
Statement 2;
Return (value);
}
Call by value
In this type, value of actual arguments is passed to the formal arguments and the operation is
done on the formal arguments. Any change made in the formal argument does not effect the actual
arguments because formal arguments are photo copies of actual arguments.
Call by reference
In this type, instead of passing values, addresses are passed. Function operates on address
rather than values. Here the formal arguments are pointers to the actual argument.
1.18 RECURSION
A function is called repetitively by itself.