How to swap 2 numbers without a 3rd variable

0 votes

How to swap 2 numbers without a 3rd variable?

I'm trying to understand how to swap two numbers without using a third variable. I’ve heard it’s possible through arithmetic or bitwise operations, but I’m unsure of the exact steps. What’s the best approach to swap values efficiently without needing extra storage?

2 days ago in Web Development by Nidhi
• 1,720 points
11 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In Web Development

+1 vote
1 answer

How to access the Angularjs scope of a particular html element from our console?

Hello, You should follow the below steps:-- 1.Compile and ...READ MORE

answered Jan 21, 2020 in Web Development by Niroj
• 82,880 points

edited Jan 21, 2020 by Niroj 2,904 views
0 votes
1 answer

How to track with Google Analytics on a redirection page with PHP?

Hello @kartik, Since the page that is sending ...READ MORE

answered Jul 7, 2020 in Web Development by Niroj
• 82,880 points
1,794 views
0 votes
1 answer

How to deny direct access to a folder and file by htaccess?

Hello @kartik, Just move the includes folder out of the ...READ MORE

answered Aug 24, 2020 in Web Development by Niroj
• 82,880 points
9,427 views
0 votes
1 answer

How to download a file by jQuery.Ajax?

Hello @kartik, You don't need to do this ...READ MORE

answered Sep 18, 2020 in Web Development by Niroj
• 82,880 points
7,483 views
0 votes
1 answer

How to create a laravel hashed password?

Hello @kartik, Hashing A Password Using Bcrypt in Laravel: $password ...READ MORE

answered Oct 6, 2020 in Web Development by Niroj
• 82,880 points
13,396 views
0 votes
2 answers

How to verify links that open in a new tab in phpUnit?

Hey @Marium, What do you mean by "the ...READ MORE

answered Dec 14, 2020 in Web Development by Gitika
• 65,890 points
1,254 views
0 votes
1 answer

How to access url for the current if statement of laravel?

Hello @ subham , If you want to access the ...READ MORE

answered Aug 7, 2020 in Laravel by Niroj
• 82,880 points
1,342 views
0 votes
1 answer

How can i insert data in relation table using model?

Hello @Alisha, Try to work using the model ...READ MORE

answered Aug 24, 2020 in Java-Script by Niroj
• 82,880 points
1,300 views
0 votes
1 answer

How can I implement pagination for large datasets in an Express.js API?

Pagination is a technique used to divide ...READ MORE

answered 5 days ago in Web Development by kavya
35 views
0 votes
0 answers

How do you implement API request validation in Express using middleware?

How do you implement API request validation ...READ MORE

5 days ago in Web Development by Nidhi
• 1,720 points
25 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP