Notes on the C programming language.
C is a widely used programming language, developed by Brian Kernighan and Dennis Ritchie during the 1970s. It is closely tied to the development of the Unix operating system.
A program written in C needs to be compiled - I use the Ubuntu pre-installed gcc. C programs can be debugged using gdb.
Pointers
type *ptr | A pointer of type named ptr |
*prt | The value of whatever prt is pointed at |
*(ptr + i) | The value of (whatever prt is pointed at plus i) |
&thing | The address of thing |
type *ptr = &thing | A pointer of type named ptr set to the address of thing |
Converting strings to integers
ASCII | Decimal |
0 | 48 |
1 | 49 |
2 | 50 |
3 | 51 |
4 | 52 |
5 | 53 |
6 | 54 |
7 | 55 |
8 | 56 |
9 | 57 |
Links
incoming(6) | logbook | logbook | meta | preonic | software | review 2021