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