Table of Contents

C

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

Defines

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.

Storage-class specifiers

Make a variable's storage class more explicit to the compiler.

Notes

See also

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

https://verplant.org/oo_programming_in_c.shtml OOP?