SharePoint Interview Questions and Answers
Thursday, May 14, 2020
How to swap two variable values without using third variable?
Ans:- int a=10, b=20;
a=a+b; //a=30 (10+20)
b=a-b; //b=10 (30-20)
a=a-b; //a=20 (30-10)
now a=20, b=10
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment