C Tutorial/Operator/Assignment Operator — различия между версиями
Admin (обсуждение | вклад) м (1 версия: Импорт контента...) |
(нет различий)
|
Текущая версия на 13:32, 25 мая 2010
Assignment operator
Assigning the value of an expression to a variable.
<source lang="cpp">var = expression.</source>
The assignment operator is "="
The statement is in the format: Var = expression;
<source lang="cpp">#include <stdio.h>
main(){
int i,j,k; i = 6; j = 8; k = i + j; printf("sum of two numbers is %d \n",k);
}</source>
sum of two numbers is 14