Previous | Home | Next |
/** Program that call a function by value **/ #include<stdio.h> #include<conio.h> void main() { int a=23,b=45; void addab(int x,int y); clrscr(); printf("\n Before function call a=%d,b=%d",a,b); addab(a,b); printf("\n\nAfter function calla=%d,b=%d",a,b); getch(); } void addab(int x,int y) { x=x+10; y=y+10; printf("\n\ninside the functiona=%d,b=%d",x,y); }
Before function call
23 45
inside the function call
33 55
After function call
23 45
Previous | Home | Next |