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


Please Help Members By Posting Answers For Below Questions

List the special characteristics of constructor.

722


Is c++ a pure oop language?

592


Differentiate between an array and a list?

701


What is diamond problem in c++?

536


Ask to write virtual base class code?

2147






Is c++ the hardest language?

555


What is a set in c++?

528


What is the most powerful coding language?

609


What do you mean by function and operator overloading in c++?

606


Do vectors start at 0 c++?

526


What does asterisk mean in c++?

580


Write a program which uses functions like strcmp(), strcpy()? etc

609


Write a short code using c++ to print out all odd number from 1 to 100 using a for loop

580


Does c++ support multilevel and multiple inheritances?

544


Is java made in c++?

579