Home / Definitions / Assign

Assign

Webopedia Staff
Last Updated May 24, 2021 7:35 am

To give a value to a variable. In programming, you assign a value to a variable with a special symbol called an assignment operator. In many languages, the assignment operator is the equal sign (=). For example, the following C language statement assigns the value 5 to the variable x:

x = 5

Such a statement is called an assignment statement.