C is a versatile, mature and efficient language.
Expressions are a combination of operators and operands.
An expression followed by a semmicolon (“;”) is a statement (it is an action)
C concepts
Memory Management
Structs
Debug messages
Random numbers
In C you can define stuff that's quickly replaced by the preprocessor.
Let's say you have the following program:
#include <stdio.h> int main() { printf("Hello, World!\n"); #ifdef DEBUG printf("Secret debug info!\n"); #endif return 0; }
Compile it with gcc -o prog -c prog.c -DDEBUG. Your program will print out the secret debug info in addition to its regular output.
This is useful for debugging and more.
Make a variable's storage class more explicit to the compiler.
char* s;char s[];thinkpad->price = 800; (thinkpad is a pointer to a struct laptop thinkpad struct)(*thinkpad).price = 800;<stdint.h> for fixed-size types such as uint64_t
https://beej.us/guide/bgc/ → Great funny introduction to C
https://c-faq.com/index.html → C FAQs, very useful
https://www.learn-c.org/ → wip C guide
http://web.archive.org/web/20080217222203/http://c.snippets.org/ Useful public domain C snippets
https://www.andreinc.net/2023/02/01/demystifying-bitwise-ops#number-systems interesting article about binary operators and memory in general