This page contains Syllabus of C Programming of BIT.

Title C Programming
Short Name C
Course code BIT102
Nature of course Theory + Lab
Semester first-semester
Full marks 60 + 20 + 20
Pass marks 24 + 8 + 8
Credit Hrs 3
Elective/Compulsary Compulsary

Course Description

 Course Description:

This course familiarizes students with basic principles of programming. It introduces structured

programming paradigm using a high level language called C. It covers the concept of problem

solving techniques, program design, and basic elements of C along with the detailed concept of

operators, statements, arrays, functions, pointers, structures and file handling.

Course Objective:

The main objective of this course is to acquaint the students with good program design through

structured programming paradigm for developing program for specific tasks using C Programming

Language as well as to present the syntax and semantics of the C language

Units and Unit Content

1. Introduction
teaching hours: 3 hrs

History and Advantages of C, Problems Analysis, Algorithm and Flowchart (introduction and characteristics of algorithm, introduction and symbols of flowchart start/stop, read/print, processing statement, condition check, direction of flow), Structure of a C Program (preprocessor directive, #include and #define directives, header files and library files); Writing, compiling, Debugging, Executing and Testing a C Program in windows and Linux/Unix like environment (compiler, integrated development environment, compiling and linking, compiler error, linker error, and run-time error)

2. Elements of C
teaching hours: 3 hrs

C Tokens (keywords, identifiers, operators, constants, and special symbols); C Character Sets (letters, digits, special characters and white spaces); Data types (Basic, Derived, and User Defined), Constants and Variables; Expression, Statements and Comments; Escape sequences and Delimiters

3. Input/Output function
teaching hours: 2 hrs

Conversion Specifiers; I/O functions; Formatted and Unformatted I/O (sacanf, printf, getchar, putchar, getch, getche, gets, puts, putch, getc, putc)

4. Operators and Expression
teaching hours: 4 hrs

 Arithmetic operators; Relational operators; Logical operators; Assignment operators; Type conversion in assignment; Increment and decrement operators Ternary operator (conditional operator); Bitwise operator; Other operators (comma, sizeof); Expression evaluation (implicit and explicit type conversion; Operator precedence and associatively)

5. Control Structures
teaching hours: 8 hrs

Introduction control statements, Selection statements: if, if..else, if..else if ladder, nested if, switch case; break and continue, goto and labels Iterative statement: For Loop, While Loop, Do while Loop, Nested Loop; The odd loop; Controlling the loop execution, Exit statement

5. Arrays and Strings
teaching hours: 5 hrs

Introduction to Arrays; Initializing Arrays; The meaning of array indexing; One dimensional and Multidimensional Arrays (two dimensional only); String and Basic functions dedicated to string manipulation (reading and writing strings, null character, strcpy, strcmp, strcat, strlen, strupr, strlwr, strrev)

6. Functions
teaching hours: 6 hrs

Introduction and types of functions; Declaring, Defining and Calling functions; Arguments and Return Statement; Recursive functions; Function call by value and reference; Variables' scope, local variables and function parameters; Arrays as function parameter; Void as a parameter; Parameterizing the main function; External function and variables; Header files; Static variables; Register Variables

7. The C Preprocessor
teaching hours: 2 hrs

Features of C Preprocessor; Macro Expansion; Macros with Arguments; Macros versus Functions; File Inclusion; Conditional Compilation; #if and #elif Directives; #undef Directive; #pragma Directive; The Build Process; Preprocessing; Compiling; Assembling; Linking; Loading

8. Pointers
teaching hours: 5 hrs

Introduction of Pointers, declaration and initialization of pointer variables; An address, a reference, a dereference and the sizeof operator; Pointer to nothing (NULL); Pointer assignment; Pointer Arithmetic; Pointer as argument and Pointer as return values; Pointers vs. arrays; Dynamic memory allocation

9. Structure and Unions
teaching hours: 5 hrs

Definition of Structure; Array of structures; Passing structure and array of structure to function; Pointers to structures and arrays of structures; Self- referential structures; Typedef; Table Lookup; Unions

10. File Handling
teaching hours: 2 hrs

Files vs. streams; Header files needed for stream operations; Opening and closing a stream, open modes, errno variable; Reading and writing to/from a stream; Predefined streams: stdin, stdout and stderr; Stream manipulation: fgetc(), fputc(), fgets() and fputs() functions; Raw input/output: fread() and fwrite() functions; Random access to files

Lab and Practical works