lesson 2 syntax c
[[lesson_2_syntax_c]] last edit on Aug 6, 2005 4:03 PM by rescued_by_c

[user02@FC4 Lesson02]$ cat -n syntax.c
   1  #include <stdio.h>
   2
   3  int main(void)
   4   {
   5     printf(Use quotes around messages\n);
   6
   7     return 0;
   8   }
[user02@FC4 Lesson02]$ gcc -o syntax syntax.c
syntax.c: In function ?emain?f:
syntax.c:5: error: ?eUse?f undeclared (first use in this function)
syntax.c:5: error: (Each undeclared identifier is reported only once
syntax.c:5: error: for each function it appears in.)
syntax.c:5: error: syntax error before ?equotes?f
syntax.c:5: error: stray ?e\?f in program



[user02@FC4 Lesson02]$ cat -n syntax2.c
   1  #include <stdio.h>
   2
   3  int main(void)
   4  {
   5     printf("Use quotes around messages\n");
   6
   7     return 0;
   8  }
[user02@FC4 Lesson02]$ gcc -o syntax2 syntax2.c
[user02@FC4 Lesson02]$ ./syntax2
Use quotes around messages
[user02@FC4 Lesson02]$