Computer Science, asked by lkdelhi4627, 1 year ago

Write a program of swapping of two numbers in c.

Answers

Answered by kutty001
1
This is the program for swapping of two numbers with output
Attachments:
Answered by SharmaShashtra
4

#include <stdio.h>  

 

int main()  

{  

   int x, y;  

   printf("Enter Value of x ");  

   scanf("%d", &x);  

   printf("\nEnter Value of y ");  

   scanf("%d", &y);  

 

   int temp = x;  

   x = y;  

   y = temp;  

 

   printf("\nAfter Swapping: x = %d, y = %d", x, y);  

   return 0;  

}  


Similar questions