-
Notifications
You must be signed in to change notification settings - Fork 80
/
Copy pathfun_types.c
73 lines (62 loc) · 996 Bytes
/
fun_types.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
//Programs of types of functions
/**********NO ARG & NO RETURN VALUE***********/
#include<stdio.h>
fun1();
int main()
{
fun1();
return 0;
}
fun1()
{
int a=3,b=5,sum;
sum=a+b;
printf("Addition is %d",sum);
return 0;
}
/**********WITH ARG & NO RETURN VALUE***********/
#include<stdio.h>
fun1(int);
int main()
{
int a;
fun1(a);
return 0;
}
fun1(a)
{
int x=2,y=6,dif;
dif=y-x;
printf("Diff is %d",dif);
return 0;
}
/**********WITH NO ARG & RETURN VALUE***********/
#include<stdio.h>
int fun1();
int main()
{
int a;
printf("Mul is %d",fun1());
return 0;
}
int fun1()
{
int w=10,m=3,mul;
mul=w*m;
return mul;
}
/**********WITH ARG & RETURN VALUE***********/
#include<stdio.h>
int fun1(int,int);
int main()
{
int a,b;
printf("Div is %d",fun1( a, b));
return 0;
}
int fun1(int a,int b)
{
int q=300,r=30,div;
div=q/r;
return div;
}