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:
Jenny’s Lectures - Programming in C
https://www.youtube.com/playlist?list=PLdo5W4Nhv31a8UcMN9-35ghv8qyFWD9_SNeso 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
Types of Problems
Decision, Search, Counting, Optimization
http://www.multiwingspan.co.uk/a23.php?page=typesTractable/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
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)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.Introduction
Time Complexity
Space Complexity
Algorithms
Definition & Characteristics of an algorithm
Input, Output, Definiteness, Finiteness, Effectivenesshttps://www.youtube.com/watch?v=XqWYatsgwfU (video in English by Jenny’s Lectures)
https://www.youtube.com/watch?v=3WVJLd8e8gE (video in Hindi by Coder Baba)
https://www.youtube.com/watch?v=WC0zNdqVdDk (video by Tutorials Point)
Examples of Algorithms
https://www.youtube.com/watch?v=C2InORAa6hU
(video in English by Jenny’s Lectures)
Flowcharts
Definitions and various symbols used in flowcharts
Types of Flowcharts
Document flowcharts Data flowcharts, System flowcharts, Program flowchartExamples of Flowcharts
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!)
Top-Down Approach to Software Development
System > Program > Module > Subprogram > Statement
Examples of program design with flowcharts and algorithms
Check whether the given number is positive/negative: https://www.youtube.com/watch?v=tkbYpnROyk0
Find larger of 2 numbers: https://www.youtube.com/watch?v=OO7UHADtf40
Find the largest among 3 numbers: https://www.youtube.com/watch?v=iNREA76O7Uw
Sum of first n numbers: https://www.youtube.com/watch?v=6nTme9tpJzg
Reverse digits of a number: https://www.youtube.com/watch?v=S8Z5N8efbHY
Check if given number is a palindrome or not: https://www.youtube.com/watch?v=SFRDLtQIl58
Check if number is prime: https://www.youtube.com/watch?v=aG7J3m3vlNA
Find factorial of a number: https://www.youtube.com/watch?v=Tr448cDmUYg
Find factors of a number: https://www.youtube.com/watch?v=dolcMgiJ7I0
Find GCD of two numbers: https://www.youtube.com/watch?v=O3xx3DMod0Q
Find LCM of two numbers: https://www.youtube.com/watch?v=GSUXd3TvNzQ (Hindi, has
flowchart of all previous problems too, Nice one!)
C Fundamentals
Introduction to C
Features of C
Structure of C Program
Definition Section > Link Section > Definition Section > Global Declaration section > Main Section > Sub Program SectionC Character Set
Identifiers and Keywords
Variables and Constants
Declaration and Definition of variables
Using printf()
Fundamental data types
Modifiers (short/long, signed/unsigned) https://www.youtube.com/watch?v=bUryucFPC6I
Range of data types https://www.youtube.com/watch?v=nwfoxcXgs8o
char and ASCII tables https://www.youtube.com/watch?v=QncEuobXjvw
float and double https://www.youtube.com/watch?v=vNeOx1rQ25E
Check for understanding: https://www.youtube.com/watch?v=IY79fWYkiPQ
Storage Classes
Auto
Static
Register
https://www.youtube.com/watch?v=qHZ7qf6-rhc
sizeof() operator
Preprocessor Macros and Constants
Using scanf()
Enumerations
Operators
Expressions
Primary, postfix, prefix, unary, binary, ternaryBinary arithmetic operators
(+, -, *, /, %)Unary operators: Increment/Decrement
(postfix and prefix ++, --)Relational operators
Logical operators
Bit-wise operators
Assignment operators
Ternary conditional operator
Comma operator
Precedence and associativity
Solved Examples
Type casting
Input Output Statements
printf() - already covered above in previous unit
scanf() - already covered above in previous unit
getchar() and putchar() https://www.youtube.com/watch?v=9P5vDXDJrqY
Difference between getch(), getche(,) getchar() https://www.youtube.com/watch?v=e_irpgAF5a8
gets() and puts() https://www.youtube.com/watch?v=-rNW_rpkuoQ
Escape Sequence https://www.youtube.com/watch?v=WXTVvXErH9s
Format Specifiers used with scanf() and printf() https://www.youtube.com/watch?v=g_4YwXthsdI
Control & Iterative Structures
Conditional Statements
if, nested if, if-else ladder
switch case
https://www.youtube.com/watch?v=1567inlTJKc (calculator program using switch case)
Iterative Statements
Introduction
for loop
while loop
do .. while loop
Comparison between for, while, do.. while
Jump Statements
Solved Examples
Functions
Introduction to Functions, Arguments (or Parameters) , Definition, Declaration
Library & User defined functions
Methods for parameter passing: Call by Value and Call by Reference
Solved Questions
Recursion
Examples on Recursion
Arrays
Introduction
Array Declarations
Single dimension Arrays and Bounds Checking
Two dimensional Arrays and Multi-Diemensional Array
Arrays & Functions
Program for Matrix Multiplication and Determinant
Semester 2
BCA122: Advanced C Programming & CA126: Advanced C Programming Laboratory
Preprocessor
Concept
Format of preprocessor directives
File inclusion directives (#include)
Macros (#define)
Nested macros
Parameterized macros
Macros versus functions
#error / #pragma directives
Conditional compilation (#if, #ifdef, #else, #elif, #endif)
Predefined macros (_DATE_ , _TIME_ ,_FILE_ , _LINE_ , _STDC_ )
Pointers
Concept – Reference & Dereference, Declaration, Definition, Initialization & Use, Types of
Pointers
Pointer Arithmetic
Multiple indirection
Arrays & Pointers - Pointer to array, Array of pointers
Functions & pointers - Passing pointer to function, Returning pointer from function
Function Pointers
&const
Dynamic memory management - Allocation, Resizing, Releasing
Memory leak / dangling pointers
Strings
Concept - Declaration, Definition, Initialization, Format Specifiers, String literals,Constants & variables
Reading & writing from & to console
Importance of terminating NULL character
Strings & pointers
Array of strings & array of character pointers
User defined functions
Predefined functions in string.h
strlen()
strcpy()
strcat()
strcmp()
strcmpi()
strrev()
strlwr()
strupr()
strset()
strchr()
strrchr()
strstr()
strncpy()
strncat()
strncmp()
strncmpi()
strnset()
strtok()
Command line arguments – argc and argv
Structures
Concept, Declaration, Definition, Initialization
Accessing structure members (. operator)
Array of structures
Pointers to structures
Declaring pointer to structure
Accessing structure members via pointer to structure
Structures & functions
Passing each member of structure as a separate argument
Passing structure by value / address
Nested structures
typedef & structures
Advanced Features
Unions - Concept, Declaration, definition, accessing union members
Difference between
Structures & unions - structures within union, union within structures
Pointers and unions
Nested unions
Enumerations vs Unions
Bit fields - Concept, need, use, multi-file programs
File Handling
Concept of streams
Types of files
Operations on text & binary files
Random access
Library functions for file handling
fopen()
fclose()
fgetc()
fseek()
fgets()
fputc()