Swapping numbers using Call by Value in C
C program to swap two numbers using call by value
Posted By Manisha Gupta
#include<stdio.h>
#include<conio.h>
int main()
{
int a,b;
printf("Manisha enter any numbers a&b");
scanf("%d%d",&a,&b);
swap(a,b);
printf("\n a=%d , b=%d",a,b);
getch ();
}
void swap(int x,int y)
{
int t;
t=x;
x=y;
y=t;
printf("\n x=%d y=%d",x,y);
}
ManishaTech . 2017 Copyright. All rights reserved. Designed by Manisha Gupta | Manisha Gupta