#Meta-Wlp: #Macro: TITLE wlp: Learn C (II) p. 2 #Eval: $TITLE$ #Macro: PAGE bb2-2

It prints 1, 2, 3.

In C, assignment is not a statement, as it is in Pascal. It is an operator and its operator is like that of any other binary operator. It takes two items (a right-hand-side and a left-hand-side) and it produces a result. The result of = is the value of its right-hand-side expression. The evaluation of = includes assigning this value to the leff-hand-side variable.

In C, assignment is an expression not a statement. It evaluates to a value, which can be used inside another expression

#include<stdio.h>
int main(){
  int one ; int two ; int three ;
  three = ( 
            two = ( one=1 ) + 1 ;
           ) + 1 ;
  printf("It's as easy as %d, %d, %d!\n", one, two, three ) ;
}
Will this program work? #Shuffle: none $PAGE$-A $PAGE$-B Return to Learn C Introduction #: Yes. #: No. #: