lesson 6 deccount c
[[lesson_6_deccount_c]] last edit on Aug 9, 2005 2:28 AM by rescued_by_c

[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 -1
big_count is 1000
--big_count yields 999
big_count ending value 999