How to swap two numbers without using third variable | C program | swapping without third variable

preview_player
Показать описание
Hello Friends
Welcome to MC Coder 🤗🤗
In this video we will learn how to swap two numbers without using third variable.

Q. A = 20 and B = 40 perform swapping between A and B without using thrid variable.

Logic :-

A = A + B;

B = A – B;

A = A – B;

Answer :-

Now, we put values of a and b in above logic.

A = 20 + 40 = 60

B = 60 – 40 = 20

A = 60 – 20 = 40

after performing above operation values will be,

A = 40

B = 20

Please subscribe to MC Coder, if this video is helpful for you and never forget to click the bell🔔 icon for never missing my latest videos.
Thanks 😇🙏

==========================================

Swapping between two numbers without using third variable C program
Download code for free by using below link👇👇

==========================================

Download Coding app 👇👇

==========================================

#swapping
#swaptwonumberswithoutusingthirdvariable
#coding
#programing
#mccoder

==========================================

We are One by Vexento
Free Download / Stream :
Music promoted by Audio Library
Рекомендации по теме
Комментарии
Автор

Wait until sum of numbers will overflow int range.
Should have used xor instead

hievery