Beispiele zur Vorlesung
Download des gesamten Beispiele (Stand 23.09.03) für Linux und Windows.
Windows benötigt das Programm Winzip (aktuelle Version unter http://www.winzip.com).
Anordnung nach Vorlesungskapiteln:
- Das erste Programm
- Was ist ein Programm? [ tilgung.cc ]
- "Hello World" - Programm in C [ HelloWorld.c ]
- "Hello World" - Programm in C++ [ HelloWorld.cc ]
- Interne Details beim Compilieren
- Bezeichnungen in der Vorlesung
- Was ist ein Programm?
- Einfache Datentypen [ DataTypes.c , DataTypes.cc ]
- Variable [ Ex210.cc ]
- Konstanten
- Variable
- Ausdrücke, Operatoren und math. Funktionen
- Kontrollstrukturen
- Einfache Anweisung
- Block [ Ex420.cc ]
- Verzweigungen
- Die for-Schleife (Zählzyklus)
- Die while-Schleife (abweisender Zyklus) [ Ex450.cc ]
- Die do-while-Schleife (nichtabweisender Zyklus) [ Ex460.cc ]
- Die switch-Anweisung (Mehrfachverzweigung) [ Ex470.cc ]
- Anweisungen zur unbedingten Steuerungsübergabe [ Ex480.cc ]
- Vergleich der Zyklen: [ Loops.cc ]
- Programmierstil:
- Zyklus für float: [ Loop_Float.cc ]
- Genauigkeit der Zahldarstellung:
- Perfekte Zahl:
- Strukturierte Datentypen
- Zeiger (Pointer)
- Funktionen
- Der Datentyp Klasse
- Fileeingabe und -ausgabe
- Ausgabeformatierung [ Format.cc ]
- Tips und Tricks