B. Sc Year: III, Computer Programming: Institute of Science and Technology

Tribhuvan University

Institute of Science and Technology

Course of Study for Four-Year Mathematics

Course Title: Computer Programming Full Marks: 75 (60 Theory + 15 Lab)

Course No: MAT 301 Pass Marks: 26.25 (21 Theory +5.25 Lab )

Level: B. Sc Year: III

Nature of course: Theory (6 Hrs.) + Lab (3 Hrs.). Period Per Week: 9 Lecture Hrs.

 

Course Description: This course is designed for third year of Four years B.Sc. program .The course covers the basics of computer systems and programming in the “C” programming language. The course aims at demonstrating the fundamental programming techniques of C. The course includes basics of C-programming, scalar data types and their operators. The course spans the details of flow control, complex data types such as arrays, structures, unions, and pointers, structuring the code using functions, and handling the files. Examination: There will be a final examination of the theory part of 60 marks for the period of two hours. The examination for the practical (laboratory) part of 15 marks will be conducted by the concerned Department of Mathematics and the marks will be submitted to office of the controller of examination. The candidate must pass in theory and practical (laboratory) part separately. For the Laboratory examination part, the examination for 10 Marks will be taken by the teacher of the concerned department by giving two programming problems for Laboratory work each carrying 5 Marks and for the rest 5 Marks there will be of a viva voce examination in the presence of the head of the department and the subject teacher.

 

Course Contents

Unit 1: Introduction to Computer Systems:

Introduction to computers, Architecture of digital computer, Central Processing Unit, Memory system, Primary memory, Secondary memory, Inputs devices, Output devices, Computer software, System Software, Application Software, Operating Systems, Generations of computers, Applications of computers. [11 Lectures]


Unit 2: Introduction to Programming Languages Programming languages, Evolution of programming languages, Structured programming, The compilation process, Object code, Source code, Executable code, Interpreters, Linkers, Loaders, Fundamentals of algorithms, Flow charts. [7 Lectures]


Unit 3: Fundamentals of C Programming

Introduction to C, History of C, Structure of C program, Compilation and execution, The C-Character set, C-Tokens, Keywords and identifiers, Delimiters, Variables, Declaration of variable, Constants, Data types, Expressions, Statements, Comments, Symbolic constants. [11 Lectures]


Unit 4: Input/ Output Statements

Single character input/ output, Input data using scanf, Writing output data using printf, gets and puts functions. [5 Lectures]


Unit 5: Operators and Expressions

Arithmetic operators, Unary operators, Relational operator, Logical operators, Assignment operators, Increment or decrement operators, Conditional operator, Bitwise operator, Comma operator, Precedence of operators, Arithmetic expressions, Type conversion in expressions.

[10 Lectures]


Unit 6: Control Statements

Branching: if-else statement, Nested if-else, Looping: While statement, Do-while statement, For statement, Switch statement, Break statement, Goto statement. [8 Lectures]


Unit 7: Functions

Overview of functions, Library functions, User defined functions, Defining a function, Accessing a function, Function prototypes, Local and global variables, Passing arguments to a function, Call-by-value, Call-by-reference, Recursion. [12 Lectures]


Unit 8: Arrays and Pointers

Defining an array, Processing an array, One-dimensional array, Multi-dimensional array, Matrix operations, Arrays and strings, Introduction to pointers , The & and * operator, Pointer declarations, Passing pointers to a function, Pointers and one-dimensional arrays, Dynamic memory allocation, Operations on pointers, Pointers and multi-dimensional Arrays, Array of pointers. [18 Lectures]


Unit 9: Structures and Unions:

Defining a structure, Processing a structure, User defined data type (Typedef), Structures and Pointers, Passing structures to functions, Structure within structure (Nested/ self-referential Structure), Unions. [10 Lectures]


Unit 10: File Handling Concepts of file, Opening and closing of file, Modes, Input/ output function, Creating a file, Processing a file. [8

Lectures]


Laboratory works 50 Hrs.


This course requires a lot of programming practices. Each topic must be followed by a practical session. Practical sessions for each unit should be conducted and should include writing programs for mathematical problems as much as possible. The sample lab sessions could be as following descriptions;

- The lab sessions should include writing programs for basic mathematical operations like addition, subtraction, multiplication, division, average etc.

- The instructor should encourage the students to write the programs for finding factorials, computing GCD, primality testing, Fibonacci numbers, sum of natural numbers, generation of series of numbers, finding quadratic roots, generation of random numbers, computing area, volume etc.

- Students should write programs for matrix computation including addition of matrices, multiplication of matrices using the Arrays. The students should also be able to represent adjacency graphs using arrays.

- The students should write programs for creating user defined data types using Structures and Unions.

- The students should also practice handling files. They should write programs for reading and writing from/to the files.

Text books

1. 2. 3. Byron S. Gottefried, " Theory and Problems of Programming with C", Mc-Graw Hill.

Brian W. Kernighan & Dennis M. Ritchie, "The C programming Language", PHI.

E. Balagurusamy, “Programming in ANSI C”, Tata Mc-Graw Hill.

Reference books

4. 5. 6. Yashavant Kanetkar: "Let us C", BPB Publications.

Stephen G. Kochan, "Programming in C", CBS Publishers & Distributors.

Efraim Turban, R. Kelly Rainer, Jr. Richard E. Potter, “Introduction to Information Technology”, John

Wiley & Sons (Asia) Pvt. Ltd.

Alexis Leon, Mathews Leon, “Fundamentals of Information Technology”, Le

 

Netra Koirala

Netra Koirala

Computer Science Educator

Passionate computer science educator and author. Provides free study notes, practical guides, and tutorials for Class 9, 10, 11, 12, and B.Sc CSIT students in Nepal. Years of teaching experience in computer science fundamentals.

Computer Science notes, tutorials, MCQs, and educational resources for Nepal students. Covering Class 9, SEE preparation, Class 11, Class 12, SLC, programming, DBMS, networking, HTML, JavaScript, PHP, OOP and more.

Featured Post

Grade 10 Computer Science: Specification Grid & Model Questions

Specification Grid & Model Questions of Computer Science | Grade 10 📚 Examination Resource Specification Grid & M...

Followers