C Programming
C Programming
C Programming
Advanced C Project
Benefits of Fuctions
What are fuctions?
Function design
Types Of Function Calls
Call by
Call by value reference
Sends values of the
arguments Sends addresses of
the arguments
main() Call by value
int a=20,b=10;
int t;
t=x; Output :
x=y; x=10 , y=20
y=t;
a=20 , b=10
printf(“x=%d,y=%d”,x,y);
Conclusion:
printf(“a=%d,b=%d”,a,b);
a b
swap(int *x,int *y) 10 20
int t; 1001 1002
t=*x;
x y
*x=*y; Output:
1001 1002
a=10 b=20
*y=t;
2003 2004
Conclusion:
#include<conio.h>
void main()
int a;
clrscr();
scanf(“%d“,a);
getch();
#include<stdio.h>
#include<conio.h>
#include<math.h>
void main()
{
int a,p,rt;
clrscr();
scanf(“%d“,a);
p=pow(a,4);
rt=sqrt(a);