C/Language Basics/Operator Self Increase — различия между версиями
Admin (обсуждение | вклад) м (1 версия: Импорт контента...) |
Admin (обсуждение | вклад) м (1 версия: Импорт контента...) |
(нет различий)
|
Текущая версия на 13:22, 25 мая 2010
Self increase and decrease operator
<source lang="cpp">
- include <stdio.h>
int main(void) {
int i; i = 0; i++; printf("%d ", i); i--; printf("%d ", i); return 0;
}
</source>
Self increase operator
<source lang="cpp">
- include <stdio.h>
int main(void) {
int i, j; i = 1 ; j = i++; printf("i = %d j = %d", i, j); return 0;
}
</source>
Self operator
<source lang="cpp">
- include <stdio.h>
int main(void) {
int a, b; a = 1; a++; b = a; b--; printf("%d %d", a, b); return 0;
}
</source>