Swap (computer programming)
id:
swap-computer-programming-253-6202500
title:
Swap (computer programming)
text:
In computer programming, the act of swapping two variables refers to mutually exchanging the values of the variables. Usually, this is done with the data in memory. For example, in a program, two variables may be defined thus: After swap is performed, x will contain the value 0 and y will contain 1; their values have been exchanged. This operation may be generalized to other types of values, such as strings and aggregated data types. Comparison sorts use swaps to change the positions of data. In
brand slug:
wiki
category slug:
encyclopedia
description:
original url:
https://en.wikipedia.org/wiki/Swap_(computer_programming)
date created:
date modified:
2022-12-09T21:32:05Z
main entity:
{"identifier":"Q676024","url":"https://www.wikidata.org/entity/Q676024"}
image:
fields total:
13
integrity:
13