How can u swap 2 variables in C without using 3rd variable?

Answer Posted / sj

main()
{
int a=20,b=30;
clrscr();
a=a+b;
b=a-b;
a=a-b;
printf("%d%d",a,b);
getch();
}

Is This Answer Correct ?    38 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which is the best testing model?

604


I am DD. I am working as a Tester in e-learning company? IS there scope for content testing? or i have to change to software testing. pls guide me...

1678


Password is having 6 digit alphanumeric then what are the possible input conditions?

702


How is ‘build’ different from ‘release’?

644


What is client server application testing?

1550






how recovery manager works in winrunner

1560


How would you test a service oriented architecture (soa) web application?

695


Why did you choose the Software Testing Field?

1645


HI can i know who is taking real time testing classes in banglore? i am preparing to put 3+year experience in testing if possible anybody give suggestions for preparing 3+exp

1482


KINDLY FORWARD ME THE INTERVIEW QUESTIONS & ANSWERS FROM REAL TIME POINT OF VIEW FOR 1.5 YEARS EXPERIENCED CANDIDATE. MY EMAIL ID IS sky_bird433@yahoo.com

2315


Describe Testing Decomposition?

716


What do you think the role of test-group manager should be? Relative to senior management?

1675


is it possible to do performance testing in stand alone application..how wil u do that ???????

1796


What are the disadvantages of manual testing?

660


write test condition for testing SMS service of a mobile phone maximun length is 100 character while sending and 80 character for receiving write test scenarios do not write test cases

3050