Lab sessions - C programming Topics
Topic 01 : Basic Programs (Input/Output, Operators, Data Types)
1.Print patterns (stars, numbers, alphabets)
2.Swap two numbers (using third variable, without third variable, using XOR)
3.Find largest/smallest of 3 numbers
4.Check even or odd
5.Find sum, average, and product of numbers
6.Convert temperature (Celsius ↔ Fahrenheit)
7.Simple interest and compound interest calculations
8.Check leap year
9.Reverse a number
10.Sum of digits of a number
11.Factorial of a number
12.Count digits in a number
13.Generate Fibonacci series
Topic 02 : Conditional Statements and Loops
1.Find prime number
2.Display all prime numbers in a range
3.Armstrong number check and range
4.Strong number check
5.Perfect number check
6.Sum of natural numbers using loop and recursion
7.GCD (HCF) and LCM of two numbers
8.Multiplication table
9.Reverse a number and check palindrome
10.Sum of even/odd numbers in a range
11.Pattern printing using nested loops (triangles, pyramids, diamond shapes)
Topic 03 : Arrays
1.Find largest/smallest element
2.Sum and average of array elements
3.Reverse an array
4.Copy array elements
5.Count even, odd, positive, negative numbers
6.Linear search and Binary search
7.Bubble sort, Selection sort, Insertion sort
8.Merge two arrays
9.Find second largest and second smallest
10.Frequency of elements
11.Remove duplicates
12.Find missing element in a sequence
13.Rotate array left/right
Topic 04 : Recursive programs:
1.Factorial
2.Fibonacci series
3.Sum of digits
4.Reverse number
Topic 05 : Pointers
1.Pointer basics: printing addresses and values
2.Swap two numbers using pointers
3.Find largest in array using pointers
4.Sum of array elements using pointers
5.Pointer to pointer
6.String manipulation using pointers
7.Dynamic memory allocation (malloc, calloc, realloc, free)
Topic 06 :Structures and Unions
1.Structure to store student info and display
2.Find average marks of students using structure
3.Structure array for multiple students
4.Nested structures
5.Union to store different data types
6.Passing structure to functions
Topic 7 : Strings
1.Length of a string
2.Reverse a string
3.Palindrome string check
4.Count vowels, consonants, digits, special characters
5.Compare two strings
6.Concatenate two strings
7.Copy a string
8.Find substring
9.Count words in a string
10.Convert case (uppercase ↔ lowercase)
11.Check anagrams
12.Remove spaces or duplicate characters