swap 2 variables without using 3 rd variable???

Answer Posted / gm

Before Swaping
A = 10
B = 20
After Swapping
A = 20
B = 10

Solution:
B = B - A =(20-10) = 10 ---> B = 10
A = A + B =(10+10) = 20 ---> A = 20 (since B = 10 now)

Is This Answer Correct ?    2 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Please let me know how to test labels in web application manually and how the testcases would be. Please provide me a sample testcase

1237


14.What is function point breakdown?

2326


Differentiate verification and validation?

940


What does 100% statement coverage mean?

1893


how will the test plan is pepared in ur organisation>?

1593






Test approach to windows scheduler?

1754


What is neutral test case?

1903


For any web application, what are the possible login features that should be tested?

907


What are differences in testing a client server and a web application?

1609


When the GUI Testing will be held on the V model ?

1818


What is exploratory testing and when should it be performed?

766


i want information about API testing and i want info like how process can be done in company? i want added info like coding ,debugging, desing in c.v ? what should add in c.v for eg banking domin? pls any answer my question?

1698


What is software configuration management?

834


There is only requirements document. You have 10 days and 8 resources to release the system.At the end of the 8th day u tell ur TL that system is ready for release. How will you proceed with the testing process or in other words what all approach you will follow once you get requirements

1673


How do you go about testing a project?

1627