đĨ️ Learn C Programming From Scratch
Master C with practical examples, easy tutorials, and hands-on projects
đ C Programming Syllabus
This is a detailed C programming syllabus designed for a 6-month semester. It is suitable for undergraduate students or beginners learning C programming.
đ Module 1: Introduction to Programming (Weeks 1–2)
- Basics of programming
- History and importance of C
- Structure of a C program
- Compilation and Execution Process
- Keywords
- Identifiers
- Constants
- Variables
- Data Types
- Input/Output Functions (
printf(),scanf())
đĄ Practice Problems for C Programming
- Variables, Input, and Output: Write a C program to declare variables, take user input, and display the output.
- Integer Data with Arithmetic Operators: Perform basic arithmetic operations using C.
- Integer Division with Type Casting: Display division result as a floating-point using type casting.
- Area of a Circle: Calculate area using Ī × r².
- Celsius to Fahrenheit Conversion: Convert Celsius temperature to Fahrenheit.
- Absolute Value: Display absolute value of any number.
- Float & Double Manipulation: Handle and display float/double types.
- Even / Odd Check: Check if a number is even or odd.
- Positive / Negative / Zero: Check a number's sign.
- Find Largest and Smallest: Determine the largest and smallest of three numbers.
đĨ Reference Videos: Playlist 1 Playlist 2
đ§Ž Module 2: Operators and Expressions (Week 3)
- Comprehensive Guide to Operators in C Programming: Explained with Examples
- Arithmetic
- Relational
- Logical
- Assignment
- Bitwise Operators
- Increment/Decrement
- Conditional and Special Operators
- Type conversion and precedence
Practice Problems for C Programming
đ§ĩ Module 4: Arrays and Strings (Weeks 6–7)
đ§Š Module 5: Functions (Weeks 8–9)
đ Module 6: Pointers (Weeks 10–11)
- Basics of pointers and pointer arithmetic
- Pointers and arrays
- Pointers with functions
- Pointers to pointers
đĻ Module 7: Structures and Unions (Weeks 12–13)
- Declaring and using structures
- Array of structures and nested structures
- Introduction to unions
- Difference between structures and unions
đ Module 8: File Handling (Weeks 14–15)
- File functions:
fopen(),fclose(),fprintf(),fscanf() - Reading/writing text and binary files
- Use of file pointers
- Exercise of File Programming
đž Module 9: Dynamic Memory Allocation (Week 16)
- Memory allocation functions:
malloc(),calloc(),realloc(),free() - Memory leaks and handling
⚙️ Module 10: Preprocessor Directives (Week 17)
#define,#include,#ifdef,#ifndef- Macros and conditional compilation
đ Module 11: Miscellaneous Topics (Week 18)
- Command-line arguments
- Enumerations and typedefs
đ ️ Weeks 19–24: Project & Final Assessment
- Mini project development
- Internal assessments and lab tests
- Final practical and written exams
đ§Ē Lab Work / Assignments
- Write a C program in fill up an array using pointer with array.
- Sort and array in ascending and descending order.
- Write a C program to input 5 values into an array and use a pointer to calculate sum of all values.
- Write a program in C to display the longest word in a sentence.
- Write a program to display the number of vowel, number and special character in a word given by the user.
- Write a C program which contains multiple types user defined functions. Like-
Yes No → Arguments, No return
No Yes → No arguments, Return
Yes Yes → Arguments and Return
- Write a C program using Call by Value and Call by Reference.
- Write any program using local and global variables in terms of scope, lifetime, and accessibility.
- Write a C program that uses a recursive function to calculate and display the factorial of a number.
- Write a C program that takes a string as input from the user and checks whether the string is a palindrome or not using pointers.
- Write a C program to input two strings from the user and find the longest common substring between them. The program should check the characters of both strings and display the longest sequence of consecutive characters that appears in both strings.
Input:
String 1: ahsan
String 2: ahsanarif
Output:
Longest Common Substring: ahsan
- a. Write a C program that takes an integer n and prints the following pattern using nested loops. For n = 5:
5 6
5 6 7
5 6 7 8
5 6 7 8 9
- Write a C program to input two numeric arrays of the same size and add their corresponding elements. Store the results in a third array and display the resulting array.
Sample Input:
Array 1: 1 2 3 4
Array 2: 5 6 7 8
Sample Output:
Result: 6 8 10 12
- Write a program in C to print the average of all prime numbers between 1 to n
- Write a C program that takes the dimensions and elements of two matrices A (n × m) and B (m × p) from the user, checks whether multiplication is possible, and prints the resulting matrix C (A × B).Write a C program that takes the dimensions and elements of two matrices A (n × m) and B (m × p) from the user, checks whether multiplication is possible, and prints the resulting matrix C (A × B).
- Write a program in C to rotate the elements of an array to the right by one position (last element becomes first)
- Write a program in C to find the reverse of an integer using recursion.
- Draw a flowchart that checks if a number is an armstrong number or not.
- Write a C program to check whether a year is a leap year or not using a ternary operator.
- Develop a C program to draw a pattern of characters like the one shown below:
B C D E
C D E F
D E F G
- Write a program that finds and prints all Armstrong numbers between 1 to n.
- Write a recursive C program to find the reverse of a string using recursion.
- Write a program in C to rotate the elements of an array to the left by two positions (first element becomes second last).
- Write a C program that swaps two float numbers using functions.
- Draw a flowchart that checks if a number is a prime number or not.
- Write a C program that determines the largest of three numbers using a ternary operator.
- Draw the below pattern:
B A
C B A
D C B A
A
B B
C C C
D D D D
āĻোāύ āĻŽāύ্āϤāĻŦ্āϝ āύেāĻ:
āĻāĻāĻি āĻŽāύ্āϤāĻŦ্āϝ āĻĒোāϏ্āĻ āĻāϰুāύ