Tribhuvan University
Faculty of Management
Office of the Dean
Bachelor of Information Management (BIM)
Course Objective
:The main objective of this course is to familiarize students with different programming concepts using C programming language.
Course Description
:This course introduces the both theoretical and practical concepts of C programming language including introduction, basic elements, I/O, operators, control statements, arrays, functions, pointers, structures and unions, file handling, and graphics programming.
Course Contents:
Lecture hours show the approximate classroom time allocated to each unit.
Unit 1.Introduction to C Programming
Introduction to Prog ramming Language, Programming Approach: Top down and Bottom up Approach, Structured Programming, History of C, Algorithms, Pseudocode and Flowchart, Coding, Compilation and Execution, Structure of C program, Debugging.
Unit 2.Basic Elements of C
C Standards, C Character Set, C Tokens, Escape sequence, Delimiters, Variables, Data types, Constants/ Literals, Expressions, Statements and Comments, Library Functions, Preprocessor Directives.
Unit 3.Data Input and Output
Input/output operations, Conversion Specifications, Formatted I/O, and unformatted I/O.
Unit 4.Operators and Expression
Arithmetic operator, Relational operator, Boolean operator, Assignment Operator, Ternary operator, Bitwise operator, In crement or Decrement operator, Conditional operator, Special Operators (sizeof operator), Evaluation of Expression, Operator Precedence and Associativity, Type Conversion
Unit 5.Control Structure
Introduction, Conditional Stateme nts, Decision Making and Branching, Decision Making and Looping, Exit function, Break and Continue.
Unit 6.Arrays and Strings
Introduction to Array, Types of Array (Single Dimensional and Multidimensional), Declaration and Memory Representation of Array, Initialization of array, Character Array and Strings, Reading and Writing Strings, Null Character, String Library Functions.
Unit 7.Functions
Introduction of User defined functions, Library Functions vs. User defined functions, Function prototype, Function call, and Function Definition, Nested and Recursive Function, Function Arguments and Return Types, Passing Arrays to Function, Passing Strings to Function, Passing Arguments by Value, Passing Arguments by Address, Local and Global Variable, Scope visibility and lifetime of a variable.
Unit 8.Pointers
Introduction to pointers, Advantages and disadvantages of pointer The & and * operator, Declaration of pointer, Pointer to Pointers (Chain of Pointers), Pointer Arithmetic, Pointers and Arrays, Pointers and Character Strings, Array of Pointers, Pointers as Function Arguments, Function Returning pointers, Pointers and Structures, Dynamic Memory Allocation .
Unit 9.Structure and Union
Introduction, Declaration, Initialization, Array of structure, Passing structure to function, Passing array of structure to function, Nested Structure, Pointer to structure, Introduction to Union, Structure vs Union.
Unit 10.File Handling in C
Concept of File, Types of file (Text files and Binary Files), modes of file, Opening and closing of File, Input Output Operations in File, Random access in File.
Unit 11.Introduction to Graphics in C
Concepts of Graphics, Graphics Initialization and Modes, Graphics Function
Unit 12.Additional Features of C
Enumerations, C Macros, Command Line Parameters, Storage classes in C. Laboratory Works: Laboratory works should be done covering all the topics mentioned above. Each topic must be followed by a practical session.
Textbooks:
- Byron Gottfried: "Programming with C,” Fourth Edition, McGraw Hill Education.
- Brian W. Kering han, Dennis M. Ritchie, The C programming Language, Second Edition, PHI Publication. Reference Books:
- Deitel, & Deitel, “C: How to Program”, Ninth Edition, Pearson Publication.
- Al Kelley, Ira Pohl: “A Book on C”, Fourth Edition, Pearson Education.
- Yeshvant Kanetkar, “ Let Us C”, 17 th Edition, BPB publication, 2020.
- Herbert Schildt, C The Complete Reference, Fourth Edition, Osborne/McGraw - Hill Publication.
- K.N. KING: C Programming: A Modern Approach, Second Edition
- E. Balagurusamy, Programming in ANSI C, Eigth Edition, TMH publication, 2019