What is Temporary Variable

A temporary variable is a variable which holds the data for very short time, usually, it used to hold data temporary that will soon be discarded in the computer programming language. See the below example, how to use the temporary variable:

1

2

3

4

5

Temp:=a

A:=b

B:=temp

What is Temporary Variable

Our computer hardware is designed to exploit the behavior of temporary data, such that they never need to be committed.