ITM 102

Structured Programming in C

TU BITM / BIM · Semester 1 · BIM curriculum effective from 2021

Requirement
required
Credits
3
Past papers
2 papers

Syllabus

What this course covers and how the teaching time is divided.

Structured Programming in C Syllabus

Official TU PDF

Tribhuvan University

Faculty of Management

Office of the Dean

Bachelor of Information Technology Management (BITM / BIM) (BITM / BIM)

Course Title: Structured Programming in C

Course Code: ITM 102

Semester: Semester 1

Nature of Course: required

Full Marks: 100

Pass Marks: 50

Credit Hours: 3 Cr.

Curriculum: BIM curriculum effective from 2021

Course Description

:

This course introduces students to the concepts of structured programming using C language. Students learn to write efficient, modular, and reusable code using variables, data types, control statements, fun ctions, arrays, pointers, structures and unions , and file handling. The course emphasizes both theoretical understanding and practical application through hands -on coding exercises and projects. Upon completion, students will be able to design, develop, te st, and debug programs effectively and will be prepared to advance to higher -level programming languages and software development courses.

Course Objective

:

By the end of this course, students will be able to Understand the basic concepts of programming languages and the structure of C programs. Demonstrate knowledge of C programming fundamentals, including syntax, data types, operators, and expressions. Write and execute C programs using various programming constructs such as decision - making, looping, and functions. Apply structured programming principles to design modular and efficient programs. Utilize arrays, strings, pointers, and structures for solving computational problems. Implement file handling and dynamic memory allocation for real-world applications. Develop logical problem -solving skills to design and implement real -world solutions using the C language.

Course Contents:

Lecture hours show the approximate classroom time allocated to each unit.

Unit 1. Introduction to Programming Language

7 hours
  • Definition of programming language, Importance of programming in computin g, Types of programming languages
  • Programming Approach: Concept and definition of Top-Down Approach and Bottom-Up Approach
  • Algorithm (Definition and characteristics, Basic Operations of an Algorithm with example )
  • Flowchart (Definition and symbols used, Guidelines for flowcharting, Conversion of algorithm to flowchart, Basic Operations of a flowchart with examples).
  • Learning Outcomes: Define programming languages and their types (Remember)
  • Explain programming approaches and their signi ficance (Understand)
  • Develop algorithms and flowcharts for simple problems (Apply)
  • Convert algorithms to flowcharts and vice versa.
  • (Apply).

Unit 2. Basic Elements of C

6 hours
  • C Standards
  • Structure of a C program
  • compilation and execution
  • Character Set
  • C Tokens(Keywords, Identifiers, Constants, Strings, Operators, Delimiters)
  • Data Types
  • Escape Sequences
  • Variables, Constants (Literal Constants and Symbolic Constants )
  • Wri ting Comments
  • Expressions and Statements
  • Preprocessor Directives
  • Arithmetic Operators
  • Unary Operators
  • Relational and Logical Operators
  • The Comma Operator
  • Assignment Operators
  • The Conditional Operator
  • Size of Operator
  • Operator Precedence and Associativity.
  • Learning Outcomes: Describe the structure and features of a C program (Understand)
  • Identify tokens, data types, and operators in C (Remember)
  • Use variables, constants, and expressions correctly (Apply)
  • Construct simple programs using correct syntax and operator precedence.
  • (Apply)

Unit 3. Data Input and Output

3 hours
  • Introduction
  • Single Character Input and Output
  • The printf () and scanf() Functions
  • Conversion
  • Characters
  • Formatted and Unformatted I/O.
  • Learning Outcomes: Explain standard I/O operations in C . (Understand)
  • Use printf() and scanf() for formatted I/O. (Apply)
  • Write programs that take input and display output. (Apply)

Unit 4. Control Statements

6 hours
  • Introduction to simple and compound statement
  • Sequential statement
  • Branching statement (Simple if statement, if -else statement, Nested if -else statement, else-if ladder, switch statement, go to statement)
  • Looping statement (for loop, while loop, do while, Nested loop)
  • Loop interruption (break, continue) Learning Outcomes: Explain the role of control statements in programming. (Understand)
  • Implement decision-making and looping constructs. (Apply)
  • Design structured programs using nested loops and conditions. (Create)
  • Use loop interruption statements effectively. (Apply)

Unit 5. Functions

5 hours
  • Introduction to function
  • Advantages of function
  • Types of Function (Built -in and user defined function)
  • Elements of user -defined function(Function definition, Function prototype, Function parameters)
  • Scope r ules (Global Variables and Static Variables)
  • Category of User defined functions(Functions with no arguments and no return values, Functions with arguments and no return values, Functions with arguments and return values, Functions with no arguments and return values)
  • Recursive functions
  • Function call by values and reference.
  • Learning Outcomes: Define and classify types of functions in C. (Remember, Understand)
  • Implement user -defined functions with different argument and return types. (Apply)
  • Differentiate between call by value and call by reference. (Analyze)
  • Apply recursion and modular design in program development. (Apply, Create).

Unit 6. Arrays and Strings

5 hours
  • Defining and Processing Arrays
  • Types of Arrays: Single dimensional and Multidimensional
  • Array Initialization
  • Passing Arrays to Functions
  • Character Arrays
  • Strings
  • String Definition
  • NULL Character
  • String Initialization
  • Reading and Writing Strings
  • Processing Strings
  • Passing Strings to Functions
  • Library Functions for String Handling.
  • Learning Outcomes: Define and differentiate between arrays and strings. (Remember, Understand)
  • Manipulate single and multidimensional arrays. (Apply)
  • Use standard string functions for processing text. (Apply)
  • Design programs using arrays and strings for data handling. (Create).

Unit 7. Pointers

5 hours
  • Basics of Pointer
  • Pointer Declaration
  • Pointer Arithmetic
  • Pointers and Arrays
  • Dynamic Memory Allocation ( malloc, calloc, free, realloc)
  • Operations on Pointers
  • Array of Pointers, Passing and Returning Pointers to/from a Function.
  • Learning Outcomes: Explain the concept and use of pointers in C. (Understand)
  • Perform pointer operations and arithmetic. (Apply)
  • Implement dynamic memory allocation using standard functions. (Apply)
  • Develop programs using pointers for arrays and functions. (Create)

Unit 8. Structures and Unions

5 hours
  • Defining a structure
  • Declaring and accessing structure elements
  • Initializing structure
  • Array of structure
  • Pointer within structure
  • Structure within structure
  • Array within structure
  • Passing and returning structures to/from function
  • Unions
  • Comparison between structure and union.
  • Learning Outcomes: Define structures and unions and their uses. (Remember)
  • Access and manipulate structure members. (Apply)
  • Differentiate between structures and unions in terms of memory and usage. (Analyze)
  • Design programs using structures and unions for complex data handling. (Create)

Unit 9. File Handling

4 hours
  • Introduction to Files, Text and Binary Files
  • File Modes
  • File Operation (open, read, write, append, close)
  • Accessing the File sequentially and randomly.
  • Learning Outcomes: Explain file concepts, types, and modes. (Understand)
  • Implement file operations (open, read, write, append, close ). (Apply)
  • Develop programs for sequential and random file access. (Create).

Unit 10. Introduction to Graphics

2 hours
  • Concepts of Graphics, Graphics Initialization and Modes, Introduction to Graphics Function.
  • Learning Outcomes: Describe the basic concepts of graphics programming. (Understand)
  • Initialize and use basic graphics functions. (Apply)
  • Create simple graphical programs to draw and display objects.
  • (Create).
  • Pedagogical Strategies
  • Lectures with demonstration
  • Hands-on lab sessions
  • Problem-based learning
  • Guest lectures from tech industry experts
  • Continuous assessment and feedback
  • Multimedia presentations to visualize concepts
  • Mini project
  • Mode of Delivery
  • Lecture sessions (Theory)
  • Demonstration
  • Laboratory work (Practical)
  • Mini project
  • Internal Assessment Methods and Types (40%)
  • Assessment Type Weightage Details Class participation & attendance 10% Contribution to discussions, engagement in class activities Quizzes/short tests 15% Periodic quizzes to assess comprehension
  • Practical/Project 20% Lab sessions and mini project
  • Mid-term examination 25% Written test Pre-board examination 30% Comprehensive written test covering all units External Assessment Methods and Types (60%) Out of the total 60% allocated for final assessment, 40% will be assigned to the written/board examination to evaluate students’ abilities in remembering, understanding, applying, analyzing, evaluating, and creating. The remaining 20% will be assigned to the final practical examination to assess hands-on programming skills and competency.
  • Mapping Course: Learning Outcomes and Program Learning
  • Course Learning Objective (CLO) Dimensions Knowledge (K) Skills (S) Competence (C)
  • Total Learning 35% 40% 25%
  • Laboratory Works (16 hours) The laboratory work includes writing C programs for implementing the concepts of C Tokens and datatypes, Formatted and unformatted Input/output, Branching control structure, Looping control structure, User-defined functions, Arr ay, String handling function, Pointers, Structure and Union, and File handling.

Suggested Readings:

Gottfried, B. (2018). Programming with C. McGraw Hill Education. Kelley, A. & Pohl, I. (1998). A Book on C. Pearson Education. Kernighan, K.A. & Ritchie, D.M. (1988). The C programming Language. PHI Publication. Srivastava, S. K. & Srivastava, D. (n.d), Programming in C: In Depth. BPB Publications. Balagurusamy, E. (2019). Programming in ANSI C. TMH publication. Schildt, H. (2000). C: The Complete Reference. Osborne/McGraw-Hill Publication. Level: Bachelor Program: Bachelor of Information Technology Management (BITM)