Condition in for loop of C -
I have created a typo today, and then the code below can be compiled successfully:
< Pre> # include & lt; Stdio.h & gt; Int main () {int i; For (i = 0; 1,2,3,4,5; i ++) printf ("% d \ n", i); } I can not understand why
1,2,3,4,5 may be Is it considered as a condition?
You are using Comma operator More commonly, the value of 1, 2 , The value of 3, 4, 5 is 5. a, b is b . In addition, the value of f (), g () is of g () , but both subexpressions f () and G () is evaluated, so both functions are called.
Comments
Post a Comment