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 advantages of using pointers in a program?
How is static data member similar to a global variable?
When does the c++ compiler create temporary variables?
What are the effects after calling the delete this operator ?
What are the uses of static class data?
What do you mean by early binding?
Explain what are the sizes and ranges of the basic c++ data types?
What will the line of code below print out and why?
Why c++ is the best language?
What is class syntax c++?
What is a forward referencing and when should it be used?
What is a string example?
How are virtual functions implemented in c++?
What are the steps in the development cycle?
Why we use #include iostream in c++?