- 2
Swapping of two numbers without using third variable
#include<stdio.h> int main() { int a,b; printf("Enter two numbers"); scanf("%d%d",&a,&b); printf("Before swapping numbers are a=%d,b=%d",a,b); a=a+b; b=a-b; a=a-b; printf("After swapping numbers are a=%d,b=%d",a,b); return 0; }
2 Respuestas
+ 9
So what is your question ??
- 1
Yes