Arrays
In C an array is a variable that can store multiple values of the same data type. When declaring it you must define how many values the array can hold. You can then access particular elements by using indexes which start at 0. In C array out of bounds, meaning the index is not in the range of $0-length-1$, can not be checked by the compiler and therefore does not throw an error. An out of bounds exception can cause the program to crash or unexpected behavior. Arrays are initialized with the default value of that type but you can also specify specific values when initializing.
Control Flow
These work just as in many other languages so will not go into further detail.
Functions
Just as with variables functions need to be defined before they can be used. To declare a function we use function prototypes, which include a name, the type of value it return and a list of parameters it takes. Parameters being values that the function it takes as input, also with a name and type just like variables.
Introduction to C
History
Introduction to System Programming
An operating system is a program that acts as an interface between the user and the computer hardware and controls the execution of all kinds of programs. Operating systems have kernels which are responsible for scheduling, starting and ending programs but also provide other functionalities like networking or file systems.
IPC with Pipes
Interprocess comminucation - IPC is the subject of coomunicatiing, echanging data and synchronizing between to processes.
Pointers
Every variable is a memory location and every memory location has an address which can be accessed using the address-of operator, &. A pointer is a variable whose value is the address of another variable. This address is internally represented as an unsigned int on most systems however you shouldn't think of it as such (you can output it in hex using the %p format specifier). Every pointer has the type of the variable it is pointing to so the compiler knows how much memory is occupied by that variable. The * denotes a pointer. You can define and initialize a pointer by pointing to no location in memory with NULL, a so called null pointer, which is also equivalent to 0.
POSIX File I/O
The POSIX standard also defines functions/system calls for file I/O which are commonly found and used on unix systems. You have to remember that in unix everything is a file so these system calls aren't just used for text files but also multiple other things like devices, sockets etc.
POSIX Interprocess Communication
POSIX Message Queues
Processes and signals
Processes
Sockets
For a more in-depth explanation of how sockets work check out the distributed systems section.
Standard File I/O
To interact with files in C you need to have a FILE pointer a so called stream, which will let the program keep track of the memory address of the file being accessed. In C text files are sequence of characters as lines each ending with a newline (\n). Interestingly you have already been working with file I/O since the begging as C automatically opens 3 files, the standard input (keyboard), standard output and error (both being the display). You have read from and written to these files using scanf() and printf().
Strings
String are stored and can be handled as arrays of chars which is why you often hear character array instead of string. In C the compiler adds at the end of each string literal the null character, '\0' (not to be confused with NULL) so it knows where the string ends. This also means that the length of a string is always one longer then you might think it is. To get the length of a string you can implement your own function or use the built in function strlen provided in string.h.
Structures
In C structures defined using the struct keyword are a very important concept as they allow for grouping of elements very similarly to classes in other languages they just don't include functions.for example a date, month, day, year. can then create variables as type struct date. memory is allocated 3 variables inside. can access member variables with . so today.year for example. can also assign initil.compound literal can assign values after initilation like (struct date) {1,2,3} or specify the specific values with .month=9for only one time thing. can initialize structs like arrays with {7,2,2015}. or just the frist 2 or can do {.month=12}
Threads and Synchronization
Threads are similar to process and allow a program to do multiple things at once by having multiple threads in it. A key difference between threads and process is however that threads share the same global memory and just have their private stack for local variables and function calls and are therefore not as expensive as process which have the big overhead of creating an entire new memory space. This is why threads are also often called lightweight processes.
Time Measuring
In programs we care about two types of time:
Variables and Data Types
To create a variable you first need a name. A variable name must start with a letter or underscore and then be followed by any combination of letters, underscores or digits as long as the name in the end isn't a reserved word like "int". Secondly you need a type which defines how the data is stored in memory for example int is an integer. When writing int x; you are declaring a variable which reserves the space in memory to hold the later on assigned value as it knows the amount of bytes the data type of the variable needs. Initializing a variable is giving it an initial value. This can be done as part of the declaration like for example int a = 12;.