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 hql in java?
Which is more secure: java or activex? : java security
What's a code group? : java security
What is meant by annotations in java?
What is transactional in java?
can anyone tell me what kind of questions are asked for core java exam in aptech
What are the benefits of a jar file?
What is ehcache in java?
What is the java api?
How do you type the lambda symbol?
What is war file in java?
What is connection pooling in java?
What is jndi datasource in java?
What is a java singleton?
What is java net url?