Detailed Syllabus:: Testing, Software Installation and Maintenance)
Detailed Syllabus:: Testing, Software Installation and Maintenance)
Course Description: This course covers the concepts of structured programming using C
programming language.
Course Objective: This course is designed to familiarize students to the techniques of programming
in C.
Course Contents:
2
6.5 Character Array and Strings,
6.6 Reading and Writing Strings,
6.7 Null Character,
6.8 String Library Functions( string length, string copy, string concatenation, string compare)
3
9.10 Function Returning pointers,
9.11 Pointers and Structures,
9.12 Dynamic Memory Allocation
Text Books:
1. Byron Gottfried: "Programming with C," , Second Edition, McGraw Hill Education.
2. Herbert Schildt, C The Complete Reference, Fourth Edition, Osborne/McGraw-Hill
Publication.
Reference Books:
1. Paul Deitel, Harvey Deitel, C: How to Program, Eighth Edition, Pearson Publication.
2. Al Kelley, Ira Pohl: "A Book on C", Fourth Edition, Pearson Education.
3. Brian W. Keringhan, Dennis M. Ritchiem, The C programming Language, Second
Edition, PHI Publication.
4. Ajay Mittal, Programming in C: A Practical Approach, Pearson Publication
5. Stephen G. Kochan, Programming in C, CBS publishers & distributors.
6. E. Balagurusamy, Programming in ANSI C, Third Edition, TMH publishing
4
Details of Laboratory work in C programming
Laboratory Works: This is the first “programming” course in B.Sc.CSIT. It builds the foundation on
how to write a program using any high level language. Hence, this course requires a lot of
programming practice so that students will be able to develop good logic building and program
developing capability which is essential throughout the B.Sc.CSIT course and thereafter. 20% of the
total marks is assigned from the practical. Some important contents that should be included in lab
exercises are as follows:
Unit 1: 2 Hrs.
Using relational operator, logical operator, assignment operator, ternary operator, and other
operators. Evaluation of Expression to check operator precedence and associativity.
Unit 5: 6 Hrs.
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: 6 Hrs.
Create, manipulate arrays and matrices (single and multi-dimensional), work with pointers,
dynamically allocate/de-allocate storage space during runtime, manipulate strings (character
arrays) using various string handling functions.
Unit 7: 6 Hrs.
5
Unit 8: 5 Hrs.
Create and use simple structures, array of structures, nested structure. Passing structure and
array of structure to function, concept of pointer to structure
Unit 9: 6 Hrs.
Create programs that addresses pointer arithmetic, pointers and arrays, pointer and character
strings, pointers and functions, pointer and structure, and dynamic memory allocation.
Create files that address random access and input/output operations in file, create files to keep
records and manipulation of records etc.
Create graphics program that address some basic functions of graphics.h header file, e.g.
line(), arc(), circle(), ellipse(), floodfill(), getmaxx(), getmaxy() etc.
Note: Motivate students to create small project work integrating all of the above concepts.
Model Question
Section A
1. Define function and list its advantages. Describe the difference between passing arguments by value
and passing arguments by address with suitable program. [4+6]
2. Explain how structure is different from union? Make a program using structure of booklist having data
member‟s title, author, and cost. Enter four data and calculate total cost. [3+4+3]
3. Explain various modes in which file can be opened? Write a program to CREATE and WRITE N
numbers in a file “NUMBER.TXT”. Open this file then read its content and put all even numbers in
one file “EVEN.TXT” and odd numbers in another file “ODD.TXT”. [2+4+4]
Section B
4. What do you mean by a problem analysis? What are the properties of a good algorithm? Explain the
Compilation and Execution of any C program? [1+1+3]
6
5. Define nested if else statement with suitable flowchart. Write a C code to check if user given input is
exactly divisible by 5 or 11 using nested if else statement? [2+3]
6. List various binary and unary operators used in C? Write a program that uses a “while” loop to
compute and prints the sum of a given numbers of squares. For example, if 4 is input, then the program
will print 30, which is equal to 12 +22 +32 +42 . [1+4]
7. “Size of character array is always declared one more than the input size.” Justify the statement. Write a
program to read a character array input as “TRIBHUVAN UNIVERSITY” from the user and find out
how many times a character „I‟ occurs in that array? [1+4]
8. Write syntax to declare and initialize 2-dimensional array? With suitable program logic explain how
would you find transpose of a 3*3 matrix? [1+4]
9. Explain the concept of recursive function using the example program to find the factorial of given
positive integer. [5]
10. Describe the fundamental concept of pointer and its arithmetic with suitable examples. [5]
11. Explain the use of graphical functions. Write a program to draw a triangle using line() graphics
function. [1+4]
12. Write short notes on: [2+3]
i) Dynamic Memory Allocation
ii) break and continue