[Home]
[Edit this page]
[Recent Changes]
[Special Pages]
[Help]
talk:C-Programming-Tutorial
This page is to discuss "C-Programming-Tutorial". You can ask questions or make comments.
What is a talkpage?
Since the author of the tutorial states that it might not follow ANSI C here and there, I didn't change anything in it, but here are some comments about minor things inside it that are different from ANSI C:
The return 0; statement. This statement simply says, that our main function returns zero on success and -1 if not.
It returns 0 on success, but what is returns on error is platform dependant.
bool
There are no such thing as bool in ANSI C. bool is C++. The ANSI ISO/IEC 9899:1999 (aka "C99") introduces a boolean type, but it is spelled _Bool.
This list covers almost all data types supported by C. However, i have excluded one, because it belongs neither to elementary nor customized data types: pointers.
C also supports union.
While this is legal C, I doubt it is pedagogical to assign a negative value to an unsigned variable (C++ would give a warning, but most C compilers won't). Was it made on purpose, and in that case, shouldn't it be signed?
/ Lundin
[Edit this page] [Page history] [What links here] [Printer Friendly]
talk:C-Programming-Tutorial
This page is to discuss "C-Programming-Tutorial". You can ask questions or make comments.
What is a talkpage?
Since the author of the tutorial states that it might not follow ANSI C here and there, I didn't change anything in it, but here are some comments about minor things inside it that are different from ANSI C:
The return 0; statement. This statement simply says, that our main function returns zero on success and -1 if not.
It returns 0 on success, but what is returns on error is platform dependant.
bool
There are no such thing as bool in ANSI C. bool is C++. The ANSI ISO/IEC 9899:1999 (aka "C99") introduces a boolean type, but it is spelled _Bool.
This list covers almost all data types supported by C. However, i have excluded one, because it belongs neither to elementary nor customized data types: pointers.
C also supports union.
unsigned short j; j = -1;
While this is legal C, I doubt it is pedagogical to assign a negative value to an unsigned variable (C++ would give a warning, but most C compilers won't). Was it made on purpose, and in that case, shouldn't it be signed?
/ Lundin
[Edit this page] [Page history] [What links here] [Printer Friendly]
