100 likes | 212 Views
The course. Description. Computer systems programming using the C language And possibly a little C++ Translation of C into assembly language Introduction to fundamental data structures array list tree hash table. Why C?. Programs can be fast Programs can be small
E N D
Description • Computer systems programming using the C language • And possibly a little C++ • Translation of C into assembly language • Introduction to fundamental data structures • array • list • tree • hash table
Why C? • Programs can be fast • Programs can be small • Runs on many platforms • Including embedded processors • Generally with some version of GCC • Relatively easy to learn • Useful “standard” library • A subset of C++
Why not C? • Can get very obscure ++a = *p->q + b * (x>y ? 5 : 13) ; • Can lack robustness • Many viruses “attack” servers written in C • Mostly because of a small number of library routines • Hard to manage large software projects • Without object-oriented techniques • No clear standards for graphical user interfaces • C++ can be fast • Java can be small
Which C ? • K & R C -- 1972 • The Kernighan and Richie classic • ANCI C -- started 1983 • ANSI X3.159-1989 and ISO/IEC 9899:1990 • Standard C, C89, C90 • C90 • Another ANSI standard (adds C++/Java syntax) • GCC
C with objects • C++ • Used for business and gaming applications • Java • Used for networking and user interface • Executes on a “virtual machine” • C# • Used by Microsoft
Computer system programming? • Not your father’s system(s) programming • No operating system kernels • Not for system administrators • Who probably use perl and python • Not linux system programming • Closer to application programming • But at an introductory level
Translation into assembly • Illustration of modern compilation techniques • Lexical analysis (flex) • radius is a variable • 3.14 is a constant • Syntactic analysis (bison) • 3.14 * radius * radius is an expression • Code generation • By example
Fundamental data structures • Ways of ordering information • For fast access • For growth • The most useful ones • Generally taught in CS1 or CS2
Student learning outcomes • Convert the following C language elements to LC-3 assembly language: functions, pointers, arrays, structures. • Demonstrate the use of C compilers and debugging tools. • Implement the following data structures in C: array, list, tree, hash table • Define, implement, and use an abstract data type. • Analyze an algorithm to determine its execution time. • Design and implement a C program that performs a specified task.