Q:
Function to show call by value
#include
swap (int, int);
main()
{
int a, b;
printf("\nEnter value of a & b: ");
scanf("%d %d", &a, &b);
swap(a, b);
printf("\a=%d\n\b=%d", a, b);
getch();
}
swap (int a, int b)
{
int n;
n= a;
a = b;
b =n;
}
This blog is for the struggling programmers who need assitance..
No comments:
Post a Comment