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                      
Do you have a collection of Interview Questions and interested to share with us!!
Please send that collection to along with your userid / name. ThanQ
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 ?    4 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
 
  Re: swap 2 variables without using 3 rd variable???
Answer
# 7
you can go swap function
swap(a,b)
 
Is This Answer Correct ?    0 Yes 0 No
Viji
 

 
 
 
Other Manual Testing Interview Questions
 
  Question Asked @ Answers
 
What does the test strategy document contain.  1
Who will review the tes cases and when the riview will be done?  2
is tha integration testing include non functional test? TCS4
what is the difference between client server & web based applications?  1
what is localization testing?is it a black box testing or white box testing?describe briefly?  5
What is CMMI?  1
What is Conventional & Unconventional testing?  1
What type of metrics we prepare in testing?What is the use of those? can any body plz let me know. udya uday_testing@yahoo.co.in HCL7
1.What is the traceability matrix template? Darw the all fields? IBM7
How do you estimate staff requirements?  1
Describe any bug you remember in an online shopping web application?  2
Can any one explain me what is Integration Testing with Stub and Drivers.Explain with Example.who will do Integration Testing?  6
How can we do security testing while testing a project Oracle3
CAN ANYONE EXPLAIN IN DETAIL THE WATERFALL MODEL WITH THE OUTPUTS OF EACH PHASE.  4
How Far the ISTQB exam will help for our career.  5
what is upword and downword Testing?  2
what is positive and negative testing with example?  5
How the Error, Defect and Bug are related to each other ?. FIC10
Who will perform Integration Testing?  8
can u define the usecase and testcase. HCL10
 
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