lesson 4 octhex c
[[lesson_4_octhex_c]] last edit on Aug 8, 2005 4:27 AM by rescued_by_c

[user02@FC4 Lesson04]$ cat -n octhex.c
   1  #include <stdio.h>
   2
   3  int main(void)
   4  {
   5     printf("Octal: %o %o\n", 10, 20);
   6     printf("Hexadecimal: %x %x\n", 10, 20);
   7     printf("Decimal: %d %d\n", 10, 20);
   8
   9     return 0;
  10  }
[user02@FC4 Lesson04]$ gcc -o octhex octhex.c
[user02@FC4 Lesson04]$ ./octhex
Octal: 12 24
Hexadecimal: a 14
Decimal: 10 20