Skip to content

Programming in C syllabus

BCA 10221 units · 281 topicsAcademic year 2083/84
Browse the units

1Introduction to C programming language and basics (5 Hrs)

  1. 1.1
    Evolution of programming languages
  2. 1.2
    History, characteristics and applications of C
    1. 1.2.1
      History of C
    2. 1.2.2
      Characteristics of C
    3. 1.2.3
      Applications of C
  3. 1.3
    Structure of a C program
  4. 1.4
    Compilation and execution process of a C program
  5. 1.5
    C Tokens
    1. 1.5.1
      Keywords
    2. 1.5.2
      Identifiers
    3. 1.5.3
      Constants
    4. 1.5.4
      String literals
    5. 1.5.5
      Operators
  6. 1.6
    Variables
    1. 1.6.1
      Declaration
    2. 1.6.2
      Initialization
    3. 1.6.3
      Scope
    4. 1.6.4
      Lifetime
  7. 1.7
    Data Types
    1. 1.7.1
      Basic data types (int, char, float, double, void)
    2. 1.7.2
      Derived data types
    3. 1.7.3
      User-defined data types
  8. 1.8
    Type Casting
    1. 1.8.1
      Implicit type conversion
    2. 1.8.2
      Explicit type conversion
  9. 1.9
    Operators and Expressions
    1. 1.9.1
      Arithmetic
    2. 1.9.2
      Relational
    3. 1.9.3
      Logical
    4. 1.9.4
      Bitwise
    5. 1.9.5
      Assignment
    6. 1.9.6
      Increment/decrement
    7. 1.9.7
      Conditional (ternary)
    8. 1.9.8
      Special operators
      1. 1.9.8.1
        sizeof
      2. 1.9.8.2
        comma
      3. 1.9.8.3
        address-of
      4. 1.9.8.4
        dereference
    9. 1.9.9
      Operator precedence and associativity

2Input/Output and Control Structures (11 Hrs)

  1. 2.1
    Standard Input and Output Functions
    1. 2.1.1
      Formatted I/O: printf() and scanf()
    2. 2.1.2
      Unformatted I/O Functions: Character I/O
      1. 2.1.2.1
        getchar()
      2. 2.1.2.2
        putchar()
      3. 2.1.2.3
        getch()
      4. 2.1.2.4
        getche()
      5. 2.1.2.5
        putch()
  2. 2.2
    Control Structures
    1. 2.2.1
      Decision Making Statements
      1. 2.2.1.1
        if statement
      2. 2.2.1.2
        if-else statement
      3. 2.2.1.3
        Nested if-else statement
      4. 2.2.1.4
        else-if ladder
      5. 2.2.1.5
        switch statement
      6. 2.2.1.6
        Conditional operator (? :)
    2. 2.2.2
      Looping Statements
      1. 2.2.2.1
        while loop
      2. 2.2.2.2
        do-while loop
      3. 2.2.2.3
        for loop
      4. 2.2.2.4
        Nested loops
    3. 2.2.3
      Jump Statements
      1. 2.2.3.1
        break statement
      2. 2.2.3.2
        continue statement
      3. 2.2.3.3
        goto statement

3Functions, Arrays and String (11 Hrs)

  1. 3.1
    Functions
    1. 3.1.1
      Introduction to functions
      1. 3.1.1.1
        Advantages
      2. 3.1.1.2
        Function definition
      3. 3.1.1.3
        Function declaration/prototype
    2. 3.1.2
      Function call
    3. 3.1.3
      Types of functions
      1. 3.1.3.1
        Library functions
      2. 3.1.3.2
        User-defined functions
    4. 3.1.4
      Function arguments
      1. 3.1.4.1
        Call by value
      2. 3.1.4.2
        Call by reference
    5. 3.1.5
      Recursion
      1. 3.1.5.1
        Concepts
      2. 3.1.5.2
        Examples
  2. 3.2
    Arrays
    1. 3.2.1
      Introduction to arrays
      1. 3.2.1.1
        Declaration
      2. 3.2.1.2
        Initialization
      3. 3.2.1.3
        Accessing elements
    2. 3.2.2
      One-dimensional arrays
      1. 3.2.2.1
        Processing
      2. 3.2.2.2
        Examples
    3. 3.2.3
      Two-dimensional arrays
      1. 3.2.3.1
        Declaration
      2. 3.2.3.2
        Initialization
      3. 3.2.3.3
        Accessing elements
      4. 3.2.3.4
        Matrix operations
    4. 3.2.4
      Multi-dimensional arrays
    5. 3.2.5
      Arrays and functions
  3. 3.3
    Strings
    1. 3.3.1
      Introduction to strings
      1. 3.3.1.1
        Declaration
      2. 3.3.1.2
        Initialization
    2. 3.3.2
      String input/output
      1. 3.3.2.1
        gets()
      2. 3.3.2.2
        puts()
    3. 3.3.3
      String handling functions
      1. 3.3.3.1
        strlen()
      2. 3.3.3.2
        strrev()
      3. 3.3.3.3
        strcpy()
      4. 3.3.3.4
        strupr()
      5. 3.3.3.5
        strlwr()
      6. 3.3.3.6
        strcmp()
      7. 3.3.3.7
        strcat()
    4. 3.3.4
      Array of strings

4Structures, Unions, and Enumerations (5 Hrs)

  1. 4.1
    Structures and Unions
    1. 4.1.1
      Defining and declaring structures
    2. 4.1.2
      Accessing members, including nested structures and arrays of structures
    3. 4.1.3
      Passing structures to functions
    4. 4.1.4
      Defining and declaring unions
    5. 4.1.5
      Comparison of unions with structures
  2. 4.2
    Enumerations (Enums) and typedef implementation
    1. 4.2.1
      Enumerations (Enums)
    2. 4.2.2
      typedef implementation

5Pointers and Memory Management (5 Hrs)

  1. 5.1
    Pointer declaration, initialization, and dereferencing
  2. 5.2
    Pointer arithmetic
  3. 5.3
    Pointers with arrays, string, function, structure
    1. 5.3.1
      Pointers with arrays
    2. 5.3.2
      Pointers with string
    3. 5.3.3
      Pointers with function
    4. 5.3.4
      Pointers with structure
  4. 5.4
    Dynamic memory allocation
    1. 5.4.1
      malloc()
    2. 5.4.2
      calloc()
    3. 5.4.3
      realloc()
    4. 5.4.4
      free()
  5. 5.5
    DMA with structure
  6. 5.6
    Dangling pointers and memory leaks
    1. 5.6.1
      Dangling pointers
    2. 5.6.2
      Memory leaks

6File Handling, Command-Line Arguments, and Graphics (11 Hrs)

  1. 6.1
    File Handling
    1. 6.1.1
      Concepts of files (text vs. binary) and file operations
      1. 6.1.1.1
        Text vs. binary files
      2. 6.1.1.2
        Opening files
      3. 6.1.1.3
        Closing files
      4. 6.1.1.4
        Reading files
      5. 6.1.1.5
        Writing files
    2. 6.1.2
      File modes and standard I/O functions
      1. 6.1.2.1
        File modes
      2. 6.1.2.2
        fgetc()
      3. 6.1.2.3
        fputc()
      4. 6.1.2.4
        fgets()
      5. 6.1.2.5
        fputs()
      6. 6.1.2.6
        fprintf()
      7. 6.1.2.7
        fscanf()
      8. 6.1.2.8
        fread()
      9. 6.1.2.9
        fwrite()
    3. 6.1.3
      Random access (fseek, ftell, rewind) and error handling
      1. 6.1.3.1
        fseek()
      2. 6.1.3.2
        ftell()
      3. 6.1.3.3
        rewind()
      4. 6.1.3.4
        Error handling
  2. 6.2
    Command-Line Arguments
    1. 6.2.1
      Introduction to main() function parameters (argc, argv)
    2. 6.2.2
      Passing and accessing arguments from the command line
  3. 6.3
    Graphics in C
    1. 6.3.1
      Introduction to graphics programming (basic concepts, graphics modes)
      1. 6.3.1.1
        Basic concepts
      2. 6.3.1.2
        Graphics modes
    2. 6.3.2
      Drawing primitives: Points, lines, and common geometric shapes
      1. 6.3.2.1
        Points
      2. 6.3.2.2
        Lines
      3. 6.3.2.3
        Rectangles
      4. 6.3.2.4
        Circles
      5. 6.3.2.5
        Ellipses
      6. 6.3.2.6
        Arcs
      7. 6.3.2.7
        Polygons
    3. 6.3.3
      Managing colors and fill styles for graphical output
    4. 6.3.4
      Displaying and formatting text in graphics mode
    5. 6.3.5
      Fundamentals of simple animation
      1. 6.3.5.1
        Clearing the screen
      2. 6.3.5.2
        Redrawing elements
      3. 6.3.5.3
        Using delays

7Laboratory work (48 Hrs)

  1. 7.1
    Practical component and session expectations
    1. 7.1.1
      Reinforce theoretical concepts through hands-on programming exercises
    2. 7.1.2
      Minimum of 48 hours (3 hours/week for 16 weeks) dedicated to practical sessions
    3. 7.1.3
      Students are expected to complete assignments on a weekly basis
  2. 7.2
    General Instructions for Practical Sessions
    1. 7.2.1
      Familiarization with a C IDE
      1. 7.2.1.1
        Code::Blocks
      2. 7.2.1.2
        Visual Studio Code with GCC
      3. 7.2.1.3
        Eclipse CDT
      4. 7.2.1.4
        Dev-C++
      5. 7.2.1.5
        Turbo C++
    2. 7.2.2
      Understanding the compilation and execution process
    3. 7.2.3
      Debugging techniques
    4. 7.2.4
      Emphasis on practical application for complex topics, especially Pointers and File Handling, to ensure thorough understanding
  3. 7.3
    List of Practical Concepts to implement (with enhanced emphasis)
    1. 7.3.1
      Fundamental Programming Constructs
      1. 7.3.1.1
        Implement programs demonstrating basic input/output, arithmetic operations, and data type conversions
      2. 7.3.1.2
        Apply various operators (arithmetic, relational, logical, bitwise, conditional) in expressions
    2. 7.3.2
      Control Flow Mechanisms (Practical Emphasis)
      1. 7.3.2.1
        Gain practical proficiency in utilizing conditional statements (if, if-else, switch) to control program flow based on various conditions
      2. 7.3.2.2
        Implement and analyze iterative solutions using while, do-while, and for loops for repetitive tasks
      3. 7.3.2.3
        Demonstrate the effective use of jump statements (break, continue, goto) for specific control transfers
    3. 7.3.3
      Functions and Modularity (Practical Emphasis)
      1. 7.3.3.1
        Design and implement modular programs using user-defined functions, focusing on effective argument passing (call by value, call by reference) and return types
      2. 7.3.3.2
        Explore practical applications of recursive problem-solving approaches
    4. 7.3.4
      Array and String Manipulation (Practical Emphasis)
      1. 7.3.4.1
        Gain hands-on experience performing various operations on one-dimensional, two-dimensional, and multi-dimensional arrays, including searching, sorting, and matrix operations
      2. 7.3.4.2
        Implement practical solutions involving string input/output and proficiently utilize standard string handling functions
      3. 7.3.4.3
        Work effectively with arrays of strings for real-world data representation
    5. 7.3.5
      Pointers and Dynamic Memory (Strong Practical Emphasis)
      1. 7.3.5.1
        Develop robust programs demonstrating core pointer concepts, including declaration, initialization, and dereferencing
      2. 7.3.5.2
        Master pointer arithmetic and deeply understand the relationship between pointers and arrays/strings for efficient memory access
      3. 7.3.5.3
        Gain comprehensive practical experience in dynamic memory management using malloc(), calloc(), realloc(), and free() for flexible data structures
    6. 7.3.6
      Structured Data Types
      1. 7.3.6.1
        Define and manipulate structures, including nested structures, arrays of structures, and pointers to structures
      2. 7.3.6.2
        Utilize unions and understand their memory implications
      3. 7.3.6.3
        Implement programs using enumerated types
    7. 7.3.7
      File Operations (Practical Emphasis)
      1. 7.3.7.1
        Achieve practical competence in performing fundamental file operations (create, open, read, write) on both text and binary files
      2. 7.3.7.2
        Implement formatted and block I/O operations for efficient data handling with files
      3. 7.3.7.3
        Navigate and manipulate file pointers for random access within files
      4. 7.3.7.4
        Effectively incorporate error handling mechanisms for reliable file operations
    8. 7.3.8
      Command-Line Interaction
      1. 7.3.8.1
        Develop programs that accept and process command-line arguments
    9. 7.3.9
      Basic Graphics Programming
      1. 7.3.9.1
        Initialize graphics mode and draw fundamental shapes like points, lines, rectangles, circles, and ellipses
      2. 7.3.9.2
        Experiment with colors and fill patterns
      3. 7.3.9.3
        Display and format text within graphics output
      4. 7.3.9.4
        Implement simple animation sequences

8Required readings

  1. 8.1
    Balagurusamy, E. (n.d.). Programming in ANSI C (Latest ed.). Tata McGraw-Hill Education.
  2. 8.2
    Deitel, P. J., & Deitel, H. M. (n.d.). C how to program (Latest ed.). Pearson Education.
  3. 8.3
    Kernighan, B. W., & Ritchie, D. M. (n.d.). The C programming language (Latest ed.). Prentice Hall.
  4. 8.4
    Prata, S. (n.d.). C primer plus (Latest ed.). Pearson Education.

9Programming Language

  1. 9.1
    Introduction to Programming Language
  2. 9.2
    Types of Programming Language
  3. 9.3
    Language Processor
  4. 9.4
    Program Errors
  5. 9.5
    Features of Good Program
  6. 9.6
    Different Programming Paradigm
  7. 9.7
    Software Development Model
  8. 9.8
    Program Development Life Cycle
  9. 9.9
    System Design Tools

10Programming Technique

  1. 10.1
    Introduction to Programming Technique
  2. 10.2
    Top down & Bottom up Approach
  3. 10.3
    Cohesion and coupling
  4. 10.4
    Structured Programming
  5. 10.5
    Deterministic and Non-deterministic Technique
  6. 10.6
    Iterative and Recursive Logic
  7. 10.7
    Modular Designing & Programming

11Basic Concept of C

  1. 11.1
    Introduction
  2. 11.2
    History
  3. 11.3
    Features
  4. 11.4
    Advantages and Disadvantages
  5. 11.5
    Structure of C program
  6. 11.6
    Compiling Process
  7. 11.7
    C Preprocessor and Header Files
  8. 11.8
    Library Function
  9. 11.9
    Character Set
  10. 11.10
    Comments
  11. 11.11
    Tokens and its types
  12. 11.12
    Data types
  13. 11.13
    Escape Sequences
  14. 11.14
    Preprocessor Directives

12Operators and Expressions

  1. 12.1
    Arithmetic Operator
  2. 12.2
    Relational and Logical Operator
  3. 12.3
    Assignment Operator
  4. 12.4
    Increment/decrement Operator
  5. 12.5
    Conditional Operator
  6. 12.6
    Bitwise Operator
  7. 12.7
    Comma Operator
  8. 12.8
    Sizeof Operator
  9. 12.9
    Precedence and Associativity
  10. 12.10
    Expressions and its Evaluation
  11. 12.11
    Program Statement

13Input and Output

  1. 13.1
    Input/output operation
  2. 13.2
    Formatted I/O (scanf, printf)
  3. 13.3
    Unformatted I/O (getch, putch, getche, getchar, putchar, gets, puts)

14Control Structure

  1. 14.1
    Introduction
  2. 14.2
    Types of Control Structure
  3. 14.3
    Branching: if, if else, else if, switch case
  4. 14.4
    Looping: while, do while and for
  5. 14.5
    Nested Control Structure

15Array

  1. 15.1
    Introduction
  2. 15.2
    Declaration
  3. 15.3
    Initialization
  4. 15.4
    One Dimensional Array
  5. 15.5
    Multi Dimensional Array
  6. 15.6
    Sorting (Bubble, Selection)
  7. 15.7
    Searching (Sequential)
  8. 15.8
    String
  9. 15.9
    String Handling

16User Defined Function

  1. 16.1
    Introduction
  2. 16.2
    Components
  3. 16.3
    Function parameters
  4. 16.4
    Library Function vs. User Defined Function
  5. 16.5
    Different Forms of Function
  6. 16.6
    Recursion
  7. 16.7
    Passing Array to Function
  8. 16.8
    Passing String to Function
  9. 16.9
    Accessing a function (Call By Value and Call By Reference)
  10. 16.10
    Macros
  11. 16.11
    Storage Class

17Pointer

  1. 17.1
    Introduction
  2. 17.2
    The Address(&) and Indirection(*) operators
  3. 17.3
    Declaration & Initialization
  4. 17.4
    Pointer to Pointer
  5. 17.5
    Pointer Expressions
  6. 17.6
    Pointer Arithmetic
  7. 17.7
    Passing Pointer to a Function
  8. 17.8
    Pointer and Array
  9. 17.9
    Array of pointer
  10. 17.10
    Pointer and String
  11. 17.11
    Dynamic Memory Allocation

18Structure

  1. 18.1
    Introduction
  2. 18.2
    Declaration
  3. 18.3
    Initialization
  4. 18.4
    Nested Structure
  5. 18.5
    Array of structure
  6. 18.6
    Array within Structure
  7. 18.7
    Passing Structure & Array of Structure to function
  8. 18.8
    Structure & Pointer
  9. 18.9
    Bit Fields
  10. 18.10
    Union and Its Importance
  11. 18.11
    Structure vs. Union

19Data File Handling

  1. 19.1
    Introduction
  2. 19.2
    Types of File
  3. 19.3
    Opening & Closing Data File
  4. 19.4
    Read & Write Function
  5. 19.5
    Writing & Reading Data To and From Data File
  6. 19.6
    Updating Data File
  7. 19.7
    Random Accessing Files
  8. 19.8
    Printing a File

20Introduction to Graphics

  1. 20.1
    Initialization
  2. 20.2
    Graphical Mode
  3. 20.3
    Graphical Functions

21Laboratory Works

  1. 21.1
    Programming exercises covering each unit