| Commit message (Collapse) | Author | Age | Lines |
| |
|
| |
|
|
|
|
| |
Signed-off-by: Marcel Ribeiro-Dantas <mribeirodantas@seqera.io>
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* [c/en] clarity, errata, and grammar in array section
- [x] I solemnly swear that this is all original content of which I am the original author
- [x] Pull request title is prepended with `[language/lang-code]` (example `[python/fr-fr]` or `[java/en]`)
- [x] Pull request touches only one file (or a set of logically related files with similar changes made)
- [x] Content changes are aimed at *intermediate to experienced programmers* (this is a poor format for explaining fundamental programming concepts)
- [x] If you've changed any part of the YAML Frontmatter, make sure it is formatted according to [CONTRIBUTING.md](https://github.com/adambard/learnxinyminutes-docs/blob/master/CONTRIBUTING.markdown)
- [x] Yes, I have double-checked quotes and field names!
* Overlooked type uniformity
* Improve 80 col alignment and clarify loop control var declaration
* Remove agrammatical comma
* Mention typedef in struct declaration
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
|
|
| |
Following reviews from @menelion
|
|
|
| |
Just add a few explanations where I thought details were missing
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
| |
How to get information on compiler flags.
|
|
|
| |
Fixed and improved compiler flag default recommendations.
|
| |
|
|
|
| |
Fix presence of bool (Fixes #2854)
|
|
|
| |
Note on macro hygiene. Fixes #2853
|
|
|
| |
Fixes #2846, #2849, #2851, #2852 (Thanks to @noncombatant)
|
| |
|
|
|
|
|
|
|
|
| |
article (#2739)
* Make reference link in footer/summary link to Stack Overflow article
* remove name from list of contributors
|
| |
|
|
|
| |
Original link displays "This file has moved to process/coding-style.rst"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
removed whitespaces all over document
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|\
| |
| | |
[C/en] Added tidbit about fall-though in switch statements.
|
| |
| |
| |
| | |
Another pitfall, as not all languages have fall-through in switches.
|
|/
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
| |
Added additional info on dynamically allocated arrays in C.
|
| |
|
|\
| |
| |
| |
| | |
Conflicts:
c.html.markdown
|
| |\
| | |
| | | |
[c/en] clarify common tripping point of newbies
|
| | |
| | |
| | |
| | |
| | |
| | | |
int foo () {
printf("bar\n");
int x; // this is not valid in C89+
}
|
| |\ \
| | | |
| | | | |
[c/en] clarify that args' names are not required in proto
|
| | |/
| | |
| | | |
with obligatory conventional warning
|
| |\ \
| | |/
| |/| |
Translation fixes and extra information
|
| | | |
|
| |\ \
| | | |
| | | | |
example function added for call by reference
|