Searching for "variable."

Q:

Swap two variables without using third variable.

Answer

#include<stdio.h>
int main(){
    int a=5,b=10;
    a=b+a;
    b=a-b;
    a=a-b;
    printf("a= %d  b=  %d",a,b);
}

Report Error

View answer Workspace Report Error Discuss

Subject: Programming