Question :Considering a=4 and b=10. Can you swap the values without using any
temp variable? The final output should be a=10 and b=4. (Other)
Answer :a = a + b // 4 + 10 = 14
b = a - b // 14 - 10 = 4
a = a - b // 14 - 4 = 10
b = 4
a = 10
www.interviewhelper.org is a hope for all the Job seekers. Users can find unlimited here. These range from technical to HR, from functional to behavioral. www.interviewhelper.org contains in the fields like Ajax,VB,Networking,Sharepoint,JEE,Perl,Javascript,Bioinformatics,Classic ASP,Unix,Linux,Accounting,Oracle DBA,Microprocessor,Bluetooth,jms,jme,.net framework,ABAP,ASP,ASP.net,Basic .net Framework,Interview Questions,C language,C++,database,Oracle,Java,PHP,LAMP,SAP etc.
Saturday, March 14, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment