write a program to swap Two numbers without using temp variable.
Answer Posted / vigneswari
#include<iostream.h>
#include<conio.h>
void main()
{
int a,b,c,d;
cout<<"\n enter a:";
cin>>a;
cout<<"\n enter b:";
cin>>b;
c=a+b;
d=a-b;
c=a-b;
cout<<"\n answer a :"<<c;
cout<<"\n answer b:"<<d;
getch();
}
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What is a file descriptor in c?
Add Two Numbers Without Using the Addition Operator
All technical questions
What is the explanation for modular programming?
What does 2n 4c mean?
What do you mean by keywords in c?
Explain how do you print an address?
Explain pointers in c programming?
What is the best way of making my program efficient?
How can you increase the size of a statically allocated array?
Explain which of the following operators is incorrect and why? ( >=, <=, <>, ==)
What type of function is main ()?
What is difference between main and void main?
What is declaration and definition in c?
Explain with the aid of an example why arrays of structures don’t provide an efficient representation when it comes to adding and deleting records internal to the array.