Is there any possiblty to swap three numbers in a single statement
Eg :
- a = 10
- b = 20
- c = 30
I want values to be changed as per the following list
a = 20
b = 30
c = 10
Can these values be transferred in a single line?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I found another solution for this question.
You can use this in many languages like
C,C++ and Java.It will work for
floatandlongalso.