-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathfxn1.c
35 lines (31 loc) · 1.04 KB
/
fxn1.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#include<stdio.h>
void add();//fxn declaration
int main(/* arguments(parameters) */)//starting point of program
{
printf("before calling in main \n");
add();//calling of fxn
add();//calling of fxn
add();//calling of fxn
add();//calling of fxn
add();//calling of fxn
add();//calling of fxn
add();//calling of fxn
add();//calling of fxn
printf("after calling in main \n");
return 0;//ending point of program
}
//user defined fxn
void add(/*parameter*/)
{ //body open
printf("hii i am adding something\n");// code 10000K
//void is fxn return type
} //body close
//fxn is a group of statements that together perform a task.
//functions has two types
//1.built-in fxn eg. pow,sqrt,log,sin,sinh,floor,ceil
//2.user defined fxn eg. add
// fxn has 4 types
//type 1 fxn : no argument(parameter) no return type
//type 2 fxn : with argument(parameter) no return type
//type 3 fxn : no argument(parameter) with return type
//type 4 fxn : with argument(parameter) and return type