Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Simple Assignment
Collapse the table of content
Expand the table of content

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.

Community Additions

ADD
Show:
© 2015 Microsoft