this is to swap to strings....but in output the whole
strings are swapped leaving first as it is...why it is so
#include<iostream.h>
int main()
{
char a[]="ajeet";
char b[]="singh";
long x=*a;
long y=*b;
cout<<x<<":"<<y;
x=x+y;
y=x-y;
x=x-y;
*a=x;
*b=y;
cout<<x<<":"<<y;
cout<<&a<<endl;
cout<<&b<<endl;
}
Why is c++ difficult?
What are the important differences between c++ and java?
What is the difference between Class and Structure?
40 Answers HP, IBM, Samsung, TCS,
Can you please explain the difference between overloading and overriding?
What is istream and ostream in c++?
What are friend functions?
Explain "passing by value", "passing by pointer" and "passing by reference" ?
What is the use of object in c++?
Which is the best c++ compiler for beginners?
Should I learn c or c++ or c#?
What does iomanip mean in c++?
What is c++ iterator?