[user02@FC4 Lesson06]$ cat -n deccount.c
1 #include <stdio.h>
2
3 int main(void)
4 {
5 int small_count = 0;
6 int big_count = 1000;
7
8 printf("small_count is %d\n", small_count);
9 printf("small_count-- yields %d\n", small_count--);
10 printf("small_count ending value %d\n", small_count);
11
12 printf("big_count is %d\n", big_count);
13 printf("--big_count yields %d\n", --big_count);
14 printf("big_count ending value %d\n", big_count);
15
16 return 0;
17 }
[user02@FC4 Lesson06]$ gcc -o deccount deccount.c[user02@FC4 Lesson06]$ ./deccount
small_count is 0
small_count-- yields 0
small_count ending value -1big_count is 1000
--big_count yields 999
big_count ending value 999
lesson_6_deccount.c, Rev. 2, Last changed on 2005-08-09 02:28, 325 page hits