FUNCTION
Function: a
function is a group of statements that together perform a task. Every c++
program has at least one function, which is main(), and all the most trivial
programs can define additional functions. You can divide up your code into
separate functions.
Part of function:
1. Return type
2. Function name
3. Parameters
4. Body
Types of function
1. Predefine function
Example:
clrscr();
getch();
2. User define function
a. Default function
Example: void Ashish();
b. Parameterised:
Example: void Raushan(int a, int
b)
Comments
Post a Comment