write a program to swap Two numbers without using temp variable.
Answer Posted / diponkor roy
#include<iostream>
using namespace std;
int main()
{
int x,y;
cin>>x;
cin>>y;
cout<<"You enter"<<x <<" and"<<y<<endl;
x=x*y;
y=x/y;
x=x/y;
cout<<"After swap your number "<<x <<" and"<<y<<endl;
return 0;
}
| Is This Answer Correct ? | 2 Yes | 3 No |
Post New Answer View All Answers
How does free() know explain how much memory to release?
What are near, far and huge pointers?
List some basic data types in c?
What does s c mean on snapchat?
what is the diffrenet bettwen HTTP and internet protocol
How do you determine whether to use a stream function or a low-level function?
What is the purpose of the following code? Is there any problem with the code? void send(int count, short *to, short *from) { /* count > 0 assumed */ register n = (count + 7) / 8; switch (count % 8) { case 0: do { *to = *from++; case 7: *to = *from++; case 6: *to = *from++; case 5: *to = *from++; case 4: *to = *from++; case 3: *to = *from++; case 2: *to = *from++; case 1: *to = *from++; } while (--n > 0); } }
Explain how can I pad a string to a known length?
What do you mean by recursion in c?
When the macros gets expanded?
a parameter passed between a calling program and a called program a) variable b) constant c) argument d) all of the above
What is 2 d array in c?
Write the control statements in C language
What is a pointer in c plus plus?
What does typedef struct mean?