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
In an htm form i have a button which makes us to open another page in 15sec.how will you do that?
What is savepoint in java?
What is aop java?
Is lambda expression an object?
What do I need to install netbeans?
How should I format my code? How should I comment my code?
What is jdk for netbeans ide?
How do I install eclipse?
When a thread is created and started, what is its initial state?
How do I create an executable jar file?
Write a class which checks whether a given number is prime or not. Write another class to implement the behavior of previous class and print the series of twin prime number upto a given range.
Are jvm’s platform independent?
What is scrollable resultset in java?
What is crud operations in java?
What is repository pattern in java?