Aims: To introduce students to the ANSI C programming language. To develop their skills in writing good quality software using the C programming language. To provide an appreciation of the importance of good software structure and documentation. To introduce students to the UNIX operating system. To enable students to gain practical experience with programming under the UNIX environment.
After completing the unit, students should be able to (i) design, implement, test and debug C language functions and programs according to a given specification, (ii) to locate and correct semantic and syntactic errors in a given C language program, (iii) to explain various aspects of the C languages such as scope or type conversion rules and so on, (iv) to write well structured software documented with appropriate comments, (v) to understand the basic concepts of the UNIX operation system and to gain experience in using UNIX and (vi) to develop software under the programming environment of the UNIX operating system.
Writing and documentation of structured computer programs. Problem Solving. Taught, facilitated and assessed.
Fundamentals: identifiers, keywords, fundamental data types, constants, variables, arrays, declarations, operators, expressions and statements. Conditional and looping controls. Functions: defining, accessing and passing arguments to functions. Prototypes. Modular programming. Use of the C standard library functions for data input/output. Arrays: defining, processing and passing arrays to functions. Multidimensional arrays. Strings and string processing. Pointers: declaring and passing pointers to functions. Relationship between pointers and arrays. Dynamic memory allocation. Structures: defining and accessing structures. Self-referential structures. User defined data types. Unions. Bit fields. C pre-processor directives. Data structures: stacks, queues. Linked lists and trees. UNIX: system architecture, basic commands, file system structure, shells. Use of editors, compilers, debuggers and other utilities.