README.md

December 5, 2022 ยท View on GitHub

Swapping

Description

swaps two variables without using a temporary variable in a single statement

More Info

two variable values

basics

the swapped value

Submitted On
Byjeyakumarr
LevelIntermediate
User Rating4.7 (14 globes from 3 users)
CompatibilityC, C++ (general), Borland C++, UNIX C++
CategoryCoding Standards
WorldC / C++
Archive File

API Declarations

default header files

Source Code

/* i is assigned j then subtracted from sum of two and assigned to j check it out in system ,it will work for all data types*/
void main()
{
int i=10,j=20;
j=i+j-(i=j);
}