* Adds extra clarity to enum value assignment.
The previous statement shows only 1 way to declare enums, and it happens
that they specify a starting value. I clarify that a starting value is
not necessary and that all enum value could contain user specified
values.
* Added clarity to `includes` section.
specified that angle brackets are for system libraries and not just
standard libs. I also added an example of relative paths in the local
include statements.
* Added more clarity for function prototyping and main return vals.
I cleaned up some formatting; then added some clarity to how function
prototyping works, as well as recommend techniques.
* Fixed the mention of character sizes. they are not always 1 byte
* Added clarity about floating point arithmetic.
The previous comments on floating points made it feel like there was
something broken with doing comparison and arithmetics with floating
point types. I added clarity about how floats are stored in memory and
why they seem to behave strangly when used in arithmetic expressions.
* reworded boolean stuff for better clarity on _Bool type in C99
* Adds not about binary assignment
* Added clarity for value roll over
* Added section on multiple return values.
C doesnt allow returning of multiple values, so i added a section on
returning multiple values through pointers.
* added section break for printing special characters
* fix typo
Co-authored-by: Andre Polykanine <ap@oire.me>
* fix typos
Co-authored-by: Andre Polykanine <ap@oire.me>
* fix markdown syntax
Co-authored-by: Andre Polykanine <ap@oire.me>
* fix markdown syntax
Co-authored-by: Andre Polykanine <ap@oire.me>
* fix markdown syntax
Co-authored-by: Andre Polykanine <ap@oire.me>
* reword with better english
Co-authored-by: Andre Polykanine <ap@oire.me>
* reword with better english
Co-authored-by: Andre Polykanine <ap@oire.me>
Co-authored-by: Andre Polykanine <ap@oire.me>
Space should be removed.
Before:
// Access struct members with .
After:
// Access struct members with.
C should be capitalized.
Before:
// there is no Boolean type in c. We use ints instead.
After:
// there is no Boolean type in C. We use ints instead.
Before:
Header files are an important part of c as they allow for the connection of c
After:
Header files are an important part of C as they allow for the connection of C
Before:
Header files are syntactically similar to c source files but reside in ".h"
After:
Header files are syntactically similar to C source files but reside in ".h"
Before:
files. They can be included in your c source file by using the precompiler
After:
files. They can be included in your C source file by using the precompiler
Before:
as the c file.
After:
as the C file.
Before:
/* should instead be put in a c file. */
After:
/* should instead be put in a C file. */
Before:
/* Beyond the above elements, other definitions should be left to a c source */
After:
/* Beyond the above elements, other definitions should be left to a C source */
Before:
/* a header file but instead put into separate headers or a c file. */
After:
/* a header file but instead put into separate headers or a C file. */
* c: fix using pointer before introduced.
* c: init array with string literals not introduced.
To avoid using the concept pointer before it has been introduced,
previously it is changed to array.
But as @geoffliu pointed out,
array initialization using string literals is not introduced either.
So this commit uses neither pointer nor array.
Discussing `i++` and `++i` does not need to involve pointer or array.
* c: use `var = value` instead of `->`.
`->` is typically used for functions.
Thanks, @vendethiel.
some type mistakes.
It is: syntaxtically
It should be: syntactically
It is: iLoveC
Better: ILoveC
It is: passed to ≈the function
It should be: passed to the function
It is: error
It should be: Error
The current example seems to be trying to set a size for a char buffer,
use fgets to populate that buffer, and then use strtoul to convert the
char content to an unsigned integer. However, this doesn't work as
intended (in fact, it results in printing "sizeof array = 0"), and so
adapt to a simpler fscanf example. Also remove some ambiguous language
in the example output.