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
Explain suspend() method under thread class>
I am trying to create a new universal user group. Why can't i? : java security
What is loose coupling in java?
What is jpa entitymanager?
In hibernate what is the difference between the Session and SessionFactory?
What is lsdou? : java security
What is a stream in programming?
What is setstring method in java?
Why sun introduce concept of anonymous class? What is need and real life use of anonymous class
What is java language expression?
What is @override annotation in java?
What is aop java?
What is stateless class in java?
Is php faster than java?
How to reverse the singly linked list(In Node data members are(int data,int pointerTONext))