#include<stdio.h>
#include<conio.h>
void SwappingOfNumbers(int *,int *);
main()
{
int no1,no2;
clrscr();
no1 = 10;
no2 = 20;
printf("Current value of no1 and no2 is : %d and %d ",no1,no2);
swapNumbers(&no1,&no2);
printf("\n\nAfter swapping value of no1 and no2 is : %d and %d ",no1,no2);
getch();
}
void SwappingOfNumbers(int *no1,int *no2)
{
int temp;
temp = *no1;
*no1 = *no2;
*no2 = temp;
}
#include<conio.h>
void SwappingOfNumbers(int *,int *);
main()
{
int no1,no2;
clrscr();
no1 = 10;
no2 = 20;
printf("Current value of no1 and no2 is : %d and %d ",no1,no2);
swapNumbers(&no1,&no2);
printf("\n\nAfter swapping value of no1 and no2 is : %d and %d ",no1,no2);
getch();
}
void SwappingOfNumbers(int *no1,int *no2)
{
int temp;
temp = *no1;
*no1 = *no2;
*no2 = temp;
}
0 Comments