Advertisement
5_2007-2008 Coding Standards #193924

Swapping

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

AI

ИИ-обзор: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

Исходный код
original-source
/* 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);
}
Оригинальные комментарии (3)
Восстановлено из Wayback Machine