SPPU BCA 2019
C Programming study notes

Introduction

There are two great courses on youtube for learning Basics of C programming. Playlists for those two courses are:

  1. Jenny’s Lectures - Programming in C
    https://www.youtube.com/playlist?list=PLdo5W4Nhv31a8UcMN9-35ghv8qyFWD9_S

  2. Neso Academy - Introduction to Programming and Data Structures
    https://www.youtube.com/watch?v=4OGMB4Fhh50&list=PLBlnK6fEyqRhX6r2uhhlubuF5QextdCSM


The above courses do not cover everything specified in the BCA syllabus. So instead of going through the above playlist blindly, it’s better to study the subject according to the sequence specified by the BCA 2019 Syllabus. The following list reproduces the topics from the syllabus (in roughly the same ordered) and links to various videos and articles that one can watch/read to understand that sub-topic. The following list points not only to videos from the courses mentioned above but also other videos on the topics that the above courses do not cover.

Semester 1

BCA112: Problem Solving and C Programming & BCA116 C Programming Laboratory


Problem solving, algorithms and flowcharts

    1. Types of Problems

      1. Decision, Search, Counting, Optimization
        http://www.multiwingspan.co.uk/a23.php?page=types

      2. Tractable/Intractable Problems - another way of classifying problems into different types depending on how the time taken by the computer to run the program that solves the problems grows with increasing in number of inputs.
        http://www.multiwingspan.co.uk/a23.php?page=types


    1. Problem solving using computer and Problem solving aspects
      Steps involved in designing a program and writing code to solve a problem (Analysing the Problem > Developing an Algorithm > Coding > Testing and Debugging)

      1. https://ncert.nic.in/textbook/pdf/kecs104.pdf

      2. https://www.youtube.com/watch?v=qP8u7Ax-nLA

      3. https://www.youtube.com/watch?v=Tiw8mmmNFc0

    2. Difficulties in solving problems using Computers
      We use various algorithms to solve problems using computers. While doing so, we can face difficulties in the time taken for the algorithm run or the amount of memory required for the program to finish execution. Problems are difficult if the algorithm required to solve it take a very long time or a very large amount of memory to solve it.

      1. Introduction

        1. https://www.youtube.com/watch?v=eqvBaj8UYz4

      2. Time Complexity

        1. https://www.youtube.com/watch?v=9TlHvipP5yA

        2. https://www.youtube.com/watch?v=9SgLBjXqwd4

      3. Space Complexity

        1. https://www.youtube.com/watch?v=nmoQ6ZKId3k

  1. Algorithms

    1. Definition & Characteristics of an algorithm
      Input, Output, Definiteness, Finiteness, Effectiveness

      1. https://www.youtube.com/watch?v=XqWYatsgwfU (video in English by Jenny’s Lectures)

      2. https://www.youtube.com/watch?v=3WVJLd8e8gE (video in Hindi by Coder Baba)

      3. https://www.youtube.com/watch?v=WC0zNdqVdDk (video by Tutorials Point)

    2. Examples of Algorithms

      1. https://www.youtube.com/watch?v=sfScsZr9h3U

      2. https://www.youtube.com/watch?v=oz8nWf38SJU (Hindi)

      3. https://www.youtube.com/watch?v=C2InORAa6hU
        (video in English by Jenny’s Lectures)

  2. Flowcharts

    1. Definitions and various symbols used in flowcharts

      1. https://www.youtube.com/watch?v=_5TeH9VxCSk

      2. https://www.youtube.com/watch?v=174S0Nvu7Xc (Hindi)

      3. https://www.tutorialspoint.com/programming_methodologies/programming_methodologies_flowchart_elements.htm

    2. Types of Flowcharts
      Document flowcharts Data flowcharts, System flowcharts, Program flowchart

      1. https://en.wikipedia.org/wiki/Flowchart#Types

      2. https://www.gliffy.com/blog/guide-to-flowchart-symbols

    3. Examples of Flowcharts

      1. https://www.programiz.com/article/flowchart-programming

      2. https://warren2lynch.medium.com/a-comprehensive-guide-for-flowchart-over-50-examples-785d6dfdc380 (Good article with lots of practical non programming examples from real life - must read!)

  3. Top-Down Approach to Software Development
    System > Program > Module > Subprogram > Statement

    1. https://www.youtube.com/watch?v=v9M8LA2uM48

    2. https://www.youtube.com/watch?v=MQPtsf8bX9Q (Hindi)


  1. Examples of program design with flowcharts and algorithms

    1. Check whether the given number is positive/negative: https://www.youtube.com/watch?v=tkbYpnROyk0

    2. Find larger of 2 numbers: https://www.youtube.com/watch?v=OO7UHADtf40

    3. Find the largest among 3 numbers: https://www.youtube.com/watch?v=iNREA76O7Uw

    4. Sum of first n numbers: https://www.youtube.com/watch?v=6nTme9tpJzg

    5. Reverse digits of a number: https://www.youtube.com/watch?v=S8Z5N8efbHY

    6. Check if given number is a palindrome or not: https://www.youtube.com/watch?v=SFRDLtQIl58

    7. Check if number is prime: https://www.youtube.com/watch?v=aG7J3m3vlNA

    8. Find factorial of a number: https://www.youtube.com/watch?v=Tr448cDmUYg

    9. Find factors of a number: https://www.youtube.com/watch?v=dolcMgiJ7I0

    10. Find GCD of two numbers: https://www.youtube.com/watch?v=O3xx3DMod0Q

    11. Find LCM of two numbers: https://www.youtube.com/watch?v=GSUXd3TvNzQ (Hindi, has
      flowchart of all previous problems too, Nice one!)


C Fundamentals

    1. Introduction to C

      1. https://www.tutorialspoint.com/cprogramming/index.htm

    2. Features of C

      1. https://www.youtube.com/watch?v=rLf3jnHxSmU

    3. Structure of C Program
      Definition Section > Link Section > Definition Section > Global Declaration section > Main Section > Sub Program Section

      1. https://www.youtube.com/watch?v=HucJhUkDJuk

    4. C Character Set

      1. https://www.youtube.com/watch?v=2mmAYDvRsBE

    5. Identifiers and Keywords

      1. https://www.youtube.com/watch?v=Ywnv78X7TAg

    6. Variables and Constants

      1. https://www.youtube.com/watch?v=fO4FwJOShdc

      2. https://www.youtube.com/watch?v=OSyjOvFbAGI

      3. https://www.youtube.com/watch?v=Rl9w0hVxuRw

      4. https://www.youtube.com/watch?v=elMQ5YtZPxA

    7. Declaration and Definition of variables

      1. https://www.youtube.com/watch?v=iZlaWogbTzE

    8. Using printf()

      1. https://www.youtube.com/watch?v=VXol2-SoUy

    9. Fundamental data types

      1. integers https://www.youtube.com/watch?v=_9bAlgRzlkc

      2. Modifiers (short/long, signed/unsigned) https://www.youtube.com/watch?v=bUryucFPC6I

      3. Range of data types https://www.youtube.com/watch?v=nwfoxcXgs8o

      4. char and ASCII tables https://www.youtube.com/watch?v=QncEuobXjvw

      5. float and double https://www.youtube.com/watch?v=vNeOx1rQ25E

      6. Check for understanding: https://www.youtube.com/watch?v=IY79fWYkiPQ

    10. Storage Classes

      1. Auto

        1. https://www.youtube.com/watch?v=1Dkfmf4PmvQ

      2. Static

        1. https://www.youtube.com/watch?v=CRhF8a9-pzc

      3. Register

        1. https://www.youtube.com/watch?v=qHZ7qf6-rhc

    11. sizeof() operator

      1. https://www.youtube.com/watch?v=bFWieCVDc84

    12. Preprocessor Macros and Constants

      1. https://www.youtube.com/watch?v=BVnNg20AuYU

      2. https://www.youtube.com/watch?v=I1i0WgiRVXo

      3. https://www.youtube.com/watch?v=hTUvEURkNeA

    13. Using scanf()

      1. https://www.youtube.com/watch?v=ZSZwDARaQYI

      2. https://www.youtube.com/watch?v=gegaS_gX3TY

    14. Enumerations

      1. https://www.youtube.com/watch?v=jrRnWQSjdiE

      2. https://www.youtube.com/watch?v=9QdJExC2AVg

    15. Operators

      1. Expressions
        Primary, postfix, prefix, unary, binary, ternary

        1. https://www.youtube.com/watch?v=UZxvQ4AWEQ0

      2. Binary arithmetic operators
        (+, -, *, /, %)

        1. https://www.youtube.com/watch?v=50Pb27JoUrw

        2. https://www.youtube.com/watch?v=5JXcX0IqRUo

        3. https://www.youtube.com/watch?v=uK53ZhjqYng (Hindi)

      3. Unary operators: Increment/Decrement
        (postfix and prefix ++, --)

        1. https://www.youtube.com/watch?v=Lpo1QYsuAmM

        2. https://www.youtube.com/watch?v=3uRoSITqXRI

      4. Relational operators

        1. https://www.youtube.com/watch?v=1oKRTjw0yuY

      5. Logical operators

        1. https://www.youtube.com/watch?v=WGQRInmOBM8

      6. Bit-wise operators

        1. https://www.youtube.com/watch?v=jlQmeyce65Q

        2. https://www.youtube.com/watch?v=8aFik6lPPaA

        3. https://www.youtube.com/watch?v=GhhJP6vpEA8

        4. https://www.youtube.com/watch?v=kYR5biY4OHw

      7. Assignment operators

        1. https://www.youtube.com/watch?v=zv73Qv1GdwY

      8. Ternary conditional operator

        1. https://www.youtube.com/watch?v=rULDbIbrXis

      9. Comma operator

        1. https://www.youtube.com/watch?v=mhmnb80ZDBM

      10. Precedence and associativity

        1. https://www.youtube.com/watch?v=8H9G621pQq0

      11. Solved Examples

        1. https://www.youtube.com/watch?v=HAKAhma7MQg

        2. https://www.youtube.com/watch?v=-QXh0y__tYY

        3. https://www.youtube.com/watch?v=5sOZ7l2it2I

    16. Type casting

      1. https://www.youtube.com/watch?v=qc7FU9jWAxk

      2. https://www.youtube.com/watch?v=zM25fFXkTzc


Input Output Statements

  1. printf() - already covered above in previous unit

  2. scanf() - already covered above in previous unit

  3. getchar() and putchar() https://www.youtube.com/watch?v=9P5vDXDJrqY

  4. getch() https://www.youtube.com/watch?v=4pJDWo-p5bI

  5. Difference between getch(), getche(,) getchar() https://www.youtube.com/watch?v=e_irpgAF5a8

  6. gets() and puts() https://www.youtube.com/watch?v=-rNW_rpkuoQ

  7. Escape Sequence https://www.youtube.com/watch?v=WXTVvXErH9s

  8. Format Specifiers used with scanf() and printf() https://www.youtube.com/watch?v=g_4YwXthsdI


Control & Iterative Structures

    1. Conditional Statements

      1. if, nested if, if-else ladder

        1. https://www.youtube.com/watch?v=Led5aHdLoT4

        2. https://www.youtube.com/watch?v=oYuRtXcwXqw

        3. https://www.youtube.com/watch?v=ySIWMLJI7HI

        4. https://www.youtube.com/watch?v=sRCtrviXnLs

      2. switch case

        1. https://www.youtube.com/watch?v=-JMSaLRqsgo

        2. https://www.youtube.com/watch?v=BHS4iA7bsDk

        3. https://www.youtube.com/watch?v=1567inlTJKc (calculator program using switch case)

    2. Iterative Statements

      1. Introduction

        1. https://www.youtube.com/watch?v=BpeIfof3VBk

      2. for loop

        1. https://www.youtube.com/watch?v=agl3vjzbG2o

        2. https://www.youtube.com/watch?v=EqQ6ZZ1V8Rw

        3. https://www.youtube.com/watch?v=AauQihC817o

      3. while loop

        1. https://www.youtube.com/watch?v=IGuoF98qEG0

        2. https://www.youtube.com/watch?v=ocX2FN1nguA

      4. do .. while loop

        1. https://www.youtube.com/watch?v=nohmBtIby_k

      5. Comparison between for, while, do.. while

        1. https://www.youtube.com/watch?v=Z3zUwN98uRQ

    3. Jump Statements

      1. Introduction

        1. https://tutorialink.com/c/break-continue-goto.c

      2. break

        1. https://www.youtube.com/watch?v=PLgJsMEPKec

      3. continue

        1. https://www.youtube.com/watch?v=6mTxoCb1m94

      4. goto

        1. https://www.youtube.com/watch?v=RYOgMf5OS2Y

    4. Solved Examples

      1. https://www.youtube.com/watch?v=SQCPZYAXoZs

      2. https://www.youtube.com/watch?v=1HeVryTa8s0

      3. https://www.youtube.com/watch?v=0wLZbI3NpRo

      4. https://www.youtube.com/watch?v=nKb52W0mD1A

      5. https://www.youtube.com/watch?v=O6DAXvDD2x4

  1. Functions

    1. Introduction to Functions, Arguments (or Parameters) , Definition, Declaration

      1. https://www.youtube.com/watch?v=3lqgdqoY83o

      2. https://www.youtube.com/watch?v=5wAf9nzX2R8

      3. https://www.youtube.com/watch?v=gF7wjwM9Jjs

    2. Library & User defined functions

      1. https://www.geeksforgeeks.org/difference-between-user-defined-function-and-library-function-in-c-c/

    3. Methods for parameter passing: Call by Value and Call by Reference

      1. https://www.youtube.com/watch?v=HEiPxjVR8CU

    4. Solved Questions

      1. https://www.youtube.com/watch?v=WYneiMbS6qo

      2. https://www.youtube.com/watch?v=sQ8MBVuGk8k

      3. https://www.youtube.com/watch?v=GE-236hkYF0

    5. Recursion

      1. https://www.youtube.com/watch?v=kepBmgvWNDw

      2. https://www.youtube.com/watch?v=ggk7HbcnLG8

      3. https://www.youtube.com/watch?v=t9whckmAEq0

      4. https://www.youtube.com/watch?v=HIt_GPuD7wk

    6. Examples on Recursion

      1. https://www.youtube.com/watch?v=_-wrCUN4z24

      2. https://www.youtube.com/watch?v=IVLUGb_gDDE

      3. https://www.youtube.com/watch?v=4JqbrwlvreY

      4. https://www.youtube.com/watch?v=DmIBX7Jjm38

      5. https://www.youtube.com/watch?v=GL_gJbc7f-Q

      6. https://www.youtube.com/watch?v=Ou1ZlN3FDP8

  2. Arrays

    1. Introduction

      1. https://www.youtube.com/watch?v=55l-aZ7_F24

    2. Array Declarations

      1. https://www.youtube.com/watch?v=Bqud0_ozgcc

    3. Single dimension Arrays and Bounds Checking

      1. https://www.youtube.com/watch?v=g0ClJ28-8LE

      2. https://www.youtube.com/watch?v=Sr21AdNJPKg

      3. https://www.youtube.com/watch?v=hsmSDBBsifo

      4. https://www.youtube.com/watch?v=C57wwOOF6ys

      5. https://www.youtube.com/watch?v=iBFzKvCzXsw

    4. Two dimensional Arrays and Multi-Diemensional Array

      1. https://www.youtube.com/watch?v=36z4qgN3GWw

      2. https://www.youtube.com/watch?v=J1aQ9JN4vZY

      3. https://www.youtube.com/watch?v=bbkdiUbou74

      4. https://www.youtube.com/watch?v=UbBCg0-xjkU

    5. Arrays & Functions

      1. https://www.dummies.com/programming/c/how-to-use-arrays-and-functions-together-in-c-programming/

      2. https://www.youtube.com/watch?v=b4wccZ07MP4

      3. https://www.youtube.com/watch?v=gNlmJ2WrZSY

    6. Program for Matrix Multiplication and Determinant

      1. https://www.youtube.com/watch?v=aAFP5wsmH2k

      2. https://www.youtube.com/watch?v=jzdQqoG1tZs

      3. https://www.youtube.com/watch?v=dIbtPNMRwZ0

      4. https://www.youtube.com/watch?v=O_NKFQ77ahI

      5. https://www.youtube.com/watch?v=qLDDwT-kPAk

      6. https://www.youtube.com/watch?v=2fWSU6DMt7Y

Semester 2

BCA122: Advanced C Programming & CA126: Advanced C Programming Laboratory


  1. Preprocessor

    1. Concept

    2. Format of preprocessor directives

    3. File inclusion directives (#include)

    4. Macros (#define)

    5. Nested macros

    6. Parameterized macros

    7. Macros versus functions

    8. #error / #pragma directives

    9. Conditional compilation (#if, #ifdef, #else, #elif, #endif)

    10. Predefined macros (_DATE_ , _TIME_ ,_FILE_ , _LINE_ , _STDC_ )

  2. Pointers

    1. Concept – Reference & Dereference, Declaration, Definition, Initialization & Use, Types of

    2. Pointers

    3. Pointer Arithmetic

    4. Multiple indirection

    5. Arrays & Pointers - Pointer to array, Array of pointers

    6. Functions & pointers - Passing pointer to function, Returning pointer from function

    7. Function Pointers

    8. &const

    9. Dynamic memory management - Allocation, Resizing, Releasing

    10. Memory leak / dangling pointers

  3. Strings

    1. Concept - Declaration, Definition, Initialization, Format Specifiers, String literals,Constants & variables

    2. Reading & writing from & to console

    3. Importance of terminating NULL character

    4. Strings & pointers

    5. Array of strings & array of character pointers

    6. User defined functions

    7. Predefined functions in string.h

      1. strlen()

      2. strcpy()

      3. strcat()

      4. strcmp()

      5. strcmpi()

      6. strrev()

      7. strlwr()

      8. strupr()

      9. strset()

      10. strchr()

      11. strrchr()

      12. strstr()

      13. strncpy()

      14. strncat()

      15. strncmp()

      16. strncmpi()

      17. strnset()

      18. strtok()

    8. Command line arguments – argc and argv

  4. Structures

    1. Concept, Declaration, Definition, Initialization

    2. Accessing structure members (. operator)

    3. Array of structures

    4. Pointers to structures

    5. Declaring pointer to structure

    6. Accessing structure members via pointer to structure

    7. Structures & functions

    8. Passing each member of structure as a separate argument

    9. Passing structure by value / address

    10. Nested structures

    11. typedef & structures

  5. Advanced Features

    1. Unions - Concept, Declaration, definition, accessing union members

    2. Difference between

    3. Structures & unions - structures within union, union within structures

    4. Pointers and unions

    5. Nested unions

    6. Enumerations vs Unions

    7. Bit fields - Concept, need, use, multi-file programs

  6. File Handling

    1. Concept of streams

    2. Types of files

    3. Operations on text & binary files

    4. Random access

    5. Library functions for file handling

      1. fopen()

      2. fclose()

      3. fgetc()

      4. fseek()

      5. fgets()

      6. fputc()