|
|
| Zeile 8: |
Zeile 8: |
| ** Syntax | | ** Syntax |
| ** Operatoren | | ** Operatoren |
| *** ! ~
| |
| *** + - * / % ^ | & || && . [->]
| |
| *** ++ -- (++x vs x++)
| |
| *** << >>
| |
| *** += -= *= /= %= |= &= != ~= ^=
| |
| *** <<= >>=
| |
| *** Hirarchie
| |
| **** ''++x*3'' ?
| |
| **** '''TODO''' Weitere Beispiele! (andere Resultate, andere Parameter)
| |
| // Von Sebastian P.
| |
| #include <stdio.h>
| |
| int
| |
| main(void) {
| |
| const int APPLE = 1;
| |
| const int PEAR = 2;
| |
| const int MILK = 4;
| |
| const int FRUIT_MASK = APPLE | PEAR;
| |
| const int meal = MILK | PEAR;
| |
| /* Test: Does the meal contain fruits? */
| |
| printf("%d\n", meal & FRUIT_MASK != 0); /* 0, precendence fail */
| |
| printf("%d\n", (meal & FRUIT_MASK) != 0); /* 1, as expected */
| |
| return 0;
| |
| }
| |
|
| |
|
| |
| *** x ? x : x
| |
|
| |
| * Hello World | | * Hello World |
| * Compilereinführung | | * Compilereinführung |
Version vom 21. September 2009, 11:14 Uhr
Einführung
Vortragende: Sebastian D. <dyroff cs.tu-berlin.de>
Themen
- Organisatorisches
- Konzept von C
- Hello World
- Compilereinführung
Folien
Mitschnitt
Mitschnitt