Simple Assignment
Collapse the table of content
Expand the table of content
The document is archived and information here might be outdated

Simple Assignment (C)

The simple-assignment operator assigns its right operand to its left operand. The value of the right operand is converted to the type of the assignment expression and replaces the value stored in the object designated by the left operand. The conversion rules for assignment apply (see Assignment Conversions).

double x;
int y;

x = y;

In this example, the value of y is converted to type double and assigned to x.

See Also

Show:
© 2016 Microsoft