Answer Posted / yadhunandan.t
wap to swap two numbers without using third variable.
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b;
clrscr();
printf("enter the value of a & b");
scanf("%d %d",&a,&b);
printf("\n\n\n before swaping");
printf("\n\ta:%d",a);
printf("\n\tb:%d",b);
a=a+b;
b=a-b;
a=a-b;
printf("\n\n\n after swaping");
printf("\n\ta:%d",a);
printf("\n\tb:%d",b);
getch();
}
Is This Answer Correct ? | 5 Yes | 3 No |
Post New Answer View All Answers
What is meant by code profiling?
Is java an api?
What is cdi bean in java?
What is flatmap in java8?
What are the differences between java’s old java date api and java 8’s date and time api?
How do I enable java in firefox?
What is serializable in java?
What is difference between map and flatmap in java 8?
What is the use of rs next () in java?
Which is faster c++ or java?
What is dto layer in java?
What is cdi in java?
how can we create the ui using netbeans,having the code?
How do I open my java console?
What is the difference between map and flatmap in java?