Write a program to swap 2 chars without using a third
varable?
char *s = "A";
char *p = "B";
Answer Posted / s.divya
void swap(A,B)
{
A=*p;
B=*s;
getch();
}
| Is This Answer Correct ? | 1 Yes | 18 No |
Post New Answer View All Answers
What are the benefits of operator overloading?
What is the difference between an array and a list?
When should overload new operator on a global basis or a class basis?
When does the c++ compiler create temporary variables?
What is the difference between interpreters and compilers?
Is vector a class in c++?
Specify some guidelines that should be followed while overloading operators?
Which is best ide for c++?
What is the difference between the functions memmove() and memcpy()?
what are function pointers?
What is the role of static keyword for a class member variable?
Tell me can a pure virtual function have an implementation?
what are Access specifiers in C++ class? What are the types?
What is setw manipulator in c++?
Is there a sort function in c++?