EmbLogic's Blog

Author Archives: Shubham Singhal

Swaping of two number without using third variable.

#include<stdio.h> int main() { int a,b; printf(“enter the value of a &b”); scanf(“%d %d”,&a,&b); printf(“value of a=%d & b=%d\n”,a ,b); a=a+b; b=a-b; a=a-b; printf(“after swaping a=%d &b=%d\n”, a,b); return 0; }

Posted in Uncategorized | Leave a comment