#include <stdio.h>
void swap(int num1, int num2)
{
int temp;
printf("In Function values before swapping: %d %d\n", num1, num2);
temp = num1;
num1 = num2;
num2 = temp;
printf("In Function values after swapping: %d %d\n\n", num1, num2);
}
int main()
{
int n1, n2;
printf("Enter two numbers: ");
scanf("%d%d", &n1, &n2);
printf("In Main values before swapping: %d %d\n\n", n1, n2);
swap(n1, n2);
printf("In Main values after swapping: %d %d", n1, n2);
return 0;
}
OUTPUT :
For
Other Programs Visit The WebSite:- https://www.techapurba.com/
Follow
Me On Social Media :-
INSTA photography page :- https://www.instagram.com/photo_mania_hub/
Twitter link : - https://twitter.com/ApurbaKhanra199
Facebook page link (Crazy Coders) :-https://www.facebook.com/codercrazy/?modal=admin_todo_tour
Insta photography link :- https://www.instagram.com/photo_mania_hub/
Facebook link :- https://www.facebook.com/profile.php?id=100009747586288
For tech related videos visit my other website :- https://apurbatechinfo.blogspot.com/
0 Comments