c_language:overview
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| c_language:overview [2021/04/08 15:01] – [Things i should check out] utedass | c_language:overview [2022/09/12 00:30] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== C Language ====== | ||
| + | |||
| ====== Things i should read up on ====== | ====== Things i should read up on ====== | ||
| Line 7: | Line 9: | ||
| * [[https:// | * [[https:// | ||
| * What inline in combination with export and static actually does [[https:// | * What inline in combination with export and static actually does [[https:// | ||
| + | * [[http:// | ||
| [[http:// | [[http:// | ||
| + | |||
| + | [[http:// | ||
| + | ====== IOCCC ====== | ||
| [[https:// | [[https:// | ||
| + | * [[https:// | ||
| + | |||
| + | ====== 8 phases of translation in C ====== | ||
| + | [[https:// | ||
| + | |||
| + | < | ||
| + | ANSI C translation phases | ||
| + | | ||
| + | |||
| + | +-------------------------------------------------+ | ||
| + | | map physical characters to source character set | | ||
| + | | | ||
| + | | | ||
| + | +-------------------------------------------------+ | ||
| + | | | ||
| + | V | ||
| + | | ||
| + | | join lines along trailing backslashes | | ||
| + | | ||
| + | | | ||
| + | V | ||
| + | | ||
| + | | decompose into preprocessing tokens and whitespace/ | ||
| + | | ||
| + | | ||
| + | | ||
| + | | | ||
| + | V | ||
| + | +------------------------------------------------+ | ||
| + | | execute preprocessing directives/ | ||
| + | | process included files | | ||
| + | +------------------------------------------------+ | ||
| + | | | ||
| + | V | ||
| + | | ||
| + | | decode escape sequences in character constants/ | ||
| + | | ||
| + | | | ||
| + | V | ||
| + | +--------------------------------------+ | ||
| + | | concatenate adjacent string literals | | ||
| + | +--------------------------------------+ | ||
| + | | | ||
| + | V | ||
| + | +------------------------------------------+ | ||
| + | | convert preprocessing tokens to C tokens | | ||
| + | | | ||
| + | +------------------------------------------+ | ||
| + | | | ||
| + | V | ||
| + | +-----------------------------+ | ||
| + | | resolve external references | | ||
| + | | link libraries | ||
| + | | build program image | | ||
| + | +-----------------------------+ | ||
| + | </ | ||
| ====== Right-to-left rule ====== | ====== Right-to-left rule ====== | ||
| + | [[https:// | ||
| + | |||
| + | [[https:// | ||
| + | |||
| To decode the expression '' | To decode the expression '' | ||
| <code c> | <code c> | ||
| Line 23: | Line 89: | ||
| char (*(*x())[5])() : returning char | char (*(*x())[5])() : returning char | ||
| </ | </ | ||
| + | |||
| + | ====== Pointer vs Array ====== | ||
| + | They are NOT the same, despite what people say! | ||
| + | |||
| + | <code c> | ||
| + | // Example of char array vs char pointer | ||
| + | char *str1 = " | ||
| + | char str2[] = " | ||
| + | |||
| + | str1[2] = ' | ||
| + | str2[2] = ' | ||
| + | </ | ||
| + | |||
| ====== Const ====== | ====== Const ====== | ||
c_language/overview.1617894063.txt.gz · Last modified: 2022/09/12 00:30 (external edit)
