ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip       Ask Questions on ANYTHING, that arise in your Daily Life at     FORUM9.COM
Google
 
Categories  >>  Software  >>  Testing  >>  Manual Testing
 
 


 

 
 Automation Testing interview questions  Automation Testing Interview Questions
 Manual Testing interview questions  Manual Testing Interview Questions
 QA Concepts interview questions  QA Concepts Interview Questions
 Mobile Testing interview questions  Mobile Testing Interview Questions
 Test Cases interview questions  Test Cases Interview Questions
 Test Documents Reporting interview questions  Test Documents Reporting Interview Questions
 Testing AllOther interview questions  Testing AllOther Interview Questions
Question
swap 2 variables without using 3 rd variable???
 Question Submitted By :: Guest
I also faced this Question!!     Rank Answer Posted By  
 
  Re: swap 2 variables without using 3 rd variable???
Answer
# 1
let
     A=10
     B=20
after swaping A=20
              B=10
ok   
      A = A + B  (A = 20+10 = 30)
      B = A - B  (B = 20-10 = 10)---->B=10
      A = A - B  (A = 30-10 = 20)---->A=20
Thats all very simple

byee Friends
rajendra
rajendra prasad reddy
rajendra_penumalli@yahoo.com
9885162742
hyd
 
Is This Answer Correct ?    1 Yes 1 No
Rajendra
 
  Re: swap 2 variables without using 3 rd variable???
Answer
# 2
sorry rejendra but i think u r wrong
u hae initially takn a=10 and b=20
ut had taken opposite values moreovr when u have performed
the operation a=a+b
now the value of a has become 30 not the previous 1
i think this will be done with the use of temp variable
 
Is This Answer Correct ?    0 Yes 1 No
Manu
 
 
 
  Re: swap 2 variables without using 3 rd variable???
Answer
# 3
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 ?    0 Yes 0 No
Gm
 
  Re: swap 2 variables without using 3 rd variable???
Answer
# 4
a^=b
b^=a
a^=b
 
Is This Answer Correct ?    0 Yes 1 No
David
 
  Re: swap 2 variables without using 3 rd variable???
Answer
# 5
rajendra is correct

but the example he took is wrong...
 
Is This Answer Correct ?    0 Yes 2 No
Naresh
 
  Re: swap 2 variables without using 3 rd variable???
Answer
# 6
sorry your question is wrong
 
Is This Answer Correct ?    0 Yes 2 No
Hari
 

 
 
 
Other Manual Testing Interview Questions
 
  Question Asked @ Answers
 
HOw to test website manually? Is it any criteria to test ? HSBC1
what are functional and non functional requirement of SRS document.. Logica-CMG2
What is the difference between Regression Testing and Retesting?  4
what will u do if ur given 20 days to complete a testing activity but ur manages to complete it in 10 days? how will u spend the next 10 days?  5
As a real time emloyee how can we define (i)Measure (ii)measurement (iii)Metric and (iv)Indicator---- ----- plz don't mention the Text book defenation... thnx in advns  1
How u prepare Test data in testing process??? Cognizent6
differentiate re-testing and regression testing  3
Hi frnds im Priyan.in interviews they are one question 4r me.i have been asked this one in 4 interviews.." AS A TESTER, WHAT IS UR GOAL OR AIM OR AMBITION..? ".. can any one gve answer perfect answer ? tank u .. reply me plss AZTEC9
Write four steps for writting scenario ? SoftSmith2
what is testdata Impetus5
Can anybody find the bugs in this "allinterview.com" site???  7
What is Data guidelines?  1
Hi Friends - If you have any doubts in Manual Testing (Real time testing) what's happening inside the company. how testing process happening any kinds of Manual Testing Related Queries) Mail me: vinodhanandhan@gmail.com Senior Test Engineer, Bangalore. Proteans5
What is smoke testing? AMDOC7
what is agile testing  3
what is the important difference between system testing and functional testing?  7
What is difference between Client-Server and Web based architecture.? Verisoft2
What is the test strategy for installation testing? AppLabs1
Who are responsible for writing test plan? When does it start after or before writing test case???  1
what is the diffrence b/w verification and validation? CIL5
 
For more Manual Testing Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com