C-Programming

2nd Semester

Course Description

This course includes both theoretical as well as practical concepts of programming. Practical skills of programming are provided using C language, which includes basic concepts of C, operators and expressions, basic input/output functions, control structures, arrays & strings, functions, pointers, structures and unions, file handling, and graphics in C.

Course Objectives

The general objectives of this course are to provide fundamental concepts of programming language, programming techniques, and program development using C programming language.

Unit Contents

1. Programming Language : 10 hrs

Introduction to Programming Language, Types of Programming Language, Language Processor, Program Errors, Features of Good Program, Different Programming Paradigms, Software Development Life Cycle, System Design Tools.

2. Programming Technique : 5 hrs

Introduction to Programming Technique, Top down & Bottom up Approach, Cohesion and Coupling, Structured Programming, Deterministic and Non-deterministic Technique, Iterative and Recursive Logic, Modular Designing & Programming.

3. Basic concept of C : 5 hrs

Introduction, History, Features, Advantages and Disadvantages, Structure of C program, C Preprocessor and Header Files, Library Function, Character Set, Comments, Tokens and its types, Data types, Escape Sequences, Preprocessors Directives.

4. Input and Output : 3 hrs

Input/Output Operation, Formatted I/O (scanf, printf), Unformatted I/O (getch-putch, getche, getchar-putchar and gets-puts)

5. Operators and Expressions : 3 hrs

Arithmetic Operator, Relational Operator, Logical Operator, Assignment Operator, Increment/decrement Operator, Conditional Operator, Bitwise Operator, Comma Operator, Size of Operator, Operator Precedence and Associativity, Expressions and its Evaluation, Type Casting in Expression, Program Statement.

6. Control Structure : 6 hrs

Introduction, Types of Control Structure (Branching: if, if else, if elseif and switch case, Looping: while, do while and for and Jumping: goto, break and continue), Nested Control Structure.

7. Array : 6 hrs

Introduction, Declaration, Initialization, One Dimensional Array, Multi Dimensional Array, Sorting (Bubble, Selection) Searching Sequential, String Handling.

8. User Defined Function : 5 hrs

Introduction, Components, Function Parameters, Library function vs. Users Defined Function, Recursion, Passing Array to Function, Passing String to Function, Accessing a Function (Call By Value & Call By Reference), Macros, Storage Class.

9. Pointer : 6 hrs

Introduction, The Address (&) and Indirection (*) Operators, Declaration & Initialization, Pointer to Pointer, Pointer Expressions, Pointer Arithmetic, Passing Pointer to a Function, Pointer and Array, Array of Pointer, Pointer and String, Dynamic Memory Allocation.

10. Structure : 5 hrs

Introduction, Declaration, Initialization, Nested Structure, Array of Structure, Array within Structure, Passing Structure & Array Structure to function, Structure & Pointer, Bit Fields, Union and Its Importance, Structure vs. Union.

11. Data File Handling : 4 hrs

Introduction, Types of File, Opening & Closing Data File, Read & Write Function, Writing & Reading Data To and From Data File, Updating Data File, Random Accessing Files, Printing a File.

12. Introduction to Graphics : 2 hrs

Initialization, Graphical Mode, Graphical Functions.

;