CMP 103 3 Programming in C 3 0 3
CMP 103 3 Programming in C 3 0 3
CMP 103 3 Programming in C 3 0 3
3 Programming in C (3 0 3)
Sessional Final Total Theory 30 50 80 Practical 20 20 Total 50 50 100
Course Objectives: The object of this course is to acquaint the students with the basic principles of programming and development of software systems. It encompasses the use of programming systems to achieve specified goals, identification of useful programming abstractions or paradigms, the development of formal models of programs, the formalization of programming language semantics, the specifications of program, the verification of programs, etc, the thrust is to identify and clarity concepts that apply in many programming contexts: Course Contents: 1. Introduction (4hrs) History of computing and computers, Text editing and file concepts, Traditional and structured programming concept, Problems analysis, flow chart and algorithms, Program Documentation 2. Variables and data types (3hrs) Constant and variables, variable declaration, Variable Type, Simple input/output function, Operators 3. Loops and Decisions (5hrs) Introduction, For while Loop, Do while Loop, Nested Loop, Case, break and continue statements, The if, else, else-if and switch statements. 4. Functions (6hrs) Introduction, Returning a value from a function, Sending a value to a function. Arguments, External variables, Preprocessor directives, C libraries, Macros, Header files and prototyping 5. Arrays and Strings (9hrs) Introduction to arrays, Initializing Arrays, Multidimensional Arrays, String, Functions related to the strings, Function related to Graphics 6. Pointers (10hrs) Pointers definition, Pointers and Arrays, Returning multiple values from functions. Using pointers. Pointer Arithmetic, Pointer and Strings, Double indirection, Pointer to Arrays
7. Structure and Unions (5hrs) Definition of Structure, Nested type Structure, Arrays of Structure, Structure and Pointers, Unions 8. Files and File Handling (3hrs) Opening a file in different modes (Read, Write, Append), Creating a file in different modes (Read, Write, Append) Laboratory: Laboratory work at an initial stage will emphasize on the verification of programming concepts learned in class and uses of loops, functions, pointers, structures, and unions. Final project of 10 credit hours will be assigned to the students which will help students to put together most of the programming concepts developed in earlier exercises. Textbooks: 1. A book on C by A1 Kely and Ira Pohl = 2 2. The C Programming Language by kerighan. Brain and Dennis Ritchie