Detailed Syllabus C Programming BIT102 (1)
Detailed Syllabus C Programming BIT102 (1)
Semester: I
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.
Course Contents:
Unit 1: Introduction (3 Hrs.) Teaching Teaching
Methodology Hours
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 Lecture/Lab 3Hrs.
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)
1
Ternary operator (conditional operator); Bitwise operator; Other operators
(comma, sizeof); Expression evaluation (implicit and explicit type conversion;
Operator precedence and associatively)
Iterative statement: For Loop, While Loop, Do while Loop, Nested Loop; The Lecture/ Lab 4 Hrs.
odd loop; Controlling the loop execution, Exit statement
2
Text / Reference Books:
1. Let Us C, Yashavant P. Kanetkar
2. Brian Kernighan and Dennis Ritchie, The C Programming Language
3. Byron Gottfried, Programming with C, McGraw Hill EducationReference Books:
3
Laboratory work in C programming
C Programming is the first programming course in BIT program. It builds the foundation on how to
write a program using any high level language. This course is responsible for building the capability
in students regarding development of good logic building and program which is essential throughout
the BIT course and thereafter. Hence, Laboratory Works in this course emphasizes the verification of
programming concepts learned in class. Each unit should include sufficient practical lab exercise.
Further, 20% of the total marks is obtained from the practical. Students must spend 45 hours in lab
activities with supervision of instructor.
Some important contents that should be included in lab exercises are as follows:
Unit 1,2,3,4:
Using relational operator, logical operator, assignment operator, ternary operator, and other
operators. Evaluation of Expression to check operator precedence and associatively.
Unit 5:
Create decision making programs using control statements like; if, if..else, if..else ladder,
nested if, and switch cases.
Create programs using loops (for, while, do while, nested loops) and realize the differences
between entry controlled and exit controlled loops.
Unit 6:
Create, manipulate arrays and matrices (single and multi-dimensional), manipulate strings
(character arrays) using various string handling functions.
Unit 7:
Unit 8:
Create programs to address macro, file inclusion, conditional compilation (#if, #ifdef, #endif,
#ifndef, #else, #elif), building process
4
Unit 9:
Create programs that addresses pointer arithmetic, pointers and arrays, pointer and character
strings, pointers and functions, pointer and structure, and dynamic memory allocation.
Unit 10:
Create and use simple structures, array of structures, nested structure. Passing structure and
array of structure to function, concept of pointer to structure
Unit 11:
Create files that address random access and input/output operations in file, create files to keep
records and manipulation of records etc.
Note: Students should be encouraged to create small project work integrating all of the above
concepts.
5
Model Questions
1. Define array. Differentiate between 1D and 2D array. Write a program that stores 100 integers in an
array and display them in ascending order. [1+3+6]
2. Define structure. Write syntax for defining and initializing structure? Write a program that stores
details of N employees (E_id, E_Name, Salary), and display the details of those employees whose
salary is less than 10000. [1+4+5]
3. Discuss the advantages of using functions in programming. Differentiate between recursive function
and normal function. Write a program using call by reference to swap the values of two variables.
[3+3+4]
4. Define the basic structure of C program. Explain the Compilation and Execution of a C program?
[2+3]
5. What are the uses of comments and escape sequences in a C program, explain with example? [5]
6. What are relational operators and arithmetic operators? Write a C code to check if a given number is
odd or even. [2+3]
7. Define iterative statements. Write a program that using a loop to compute and prints the sum of
squares of first 10 even natural numbers. [1+4]
8. How is string defined in C program? Write a program to check if a given string is a palindrome or not.
[2+3]
9. Differentiate between switch case and else .. if ladder. Why is break statement used inside switch
case? Explain briefly. [3+2]
10. Describe the concept of pointer and its arithmetic with suitable examples. [2+3]
11. Explain the syntax of fwrite() function. Write a program to create a file named "student.txt" and
stores record of any five students given by user. [1+4]
12. Write short notes on: [2+3]
i) Formatted input/output
ii) C Preprocessors/directives