- # include <stdio.h>
- void main()
- {
- int i, j, k;
- int m, n, p;
- i = 8;
- j = 10;
- k = 12;
- /* 自增在操作数之前 */
- m = ++i;
- printf("i = %dn", i);
- printf("m = %dn", m);
- /* 自减在操作数之后 */
- n = j--;
- printf("j = %dn", j);
- printf("n = %dn", n);
- /* 自增、自减的混合运算 */
- p = (++m)*(n++)+(--k);
- printf("k = %dn", k);
- printf("p = %dn", p);
- }