Question:Code for swapping in c 

Answer 
#include<stdio.h>
int main(){
    int a,b,temp;
   
    printf("Enter any two integers: ");
    scanf("%d%d",&a,&b);
    printf("Before swapping: a = %d, b=%d",a,b);

    temp = a;
    a = b;
    b = temp;
    printf("\nAfter swapping: a = %d, b=%d",a,b);

    return 0;
}
 

+ Report
Total Preview: 400
Code for swapping in c
Copyright © 2024. Powered by Intellect Software Ltd