Practical C Front Page
Practical C Front Page
COLLEGE, GHAZIABAD
DEPARTMENT OF COMPUTER APPLICATION
Session 2024-25
BCA-202 C Programming Lab File
Submitted By:
Name: ________________________
Roll Number: __________________
Submitted To:
S. Page
Unit Program Description
No. No.
28 Array of structures 28
____
29 Pointer to structure 29
____
UNIT-I: Arrays
1. Write a program in C to input and display elements of an array.
2. Write a program in C to find the sum of elements in an array.
3. Write a program in C to find whether each number in an array is even or odd.
4. Write a program in C to find the maximum and minimum elements in an array.
5. Write a program in C to count the total number of odd and even numbers in an
array.
6. Write a program in C to sort an array in ascending and descending order.
7. Write a program in C to add two matrices using a two-dimensional array.
8. Write a program in C to search for an element in a given array (linear search).
UNIT-II: Pointers
1. Write a program in C to print the address and value of a variable using pointers.
2. Write a program in C to swap two numbers using pointers.
3. Write a program in C to find the area and perimeter of a circle using a single
function.
4. Write a program in C to demonstrate pointer arithmetic by incrementing and
decrementing a pointer.
5. Write a program in C to demonstrate the use of a pointer to a pointer.
6. Write a program in C to create an array of pointers and initialize it with
different integer values.
7. Write a program in C to use malloc() to dynamically allocate memory for an
integer array and take input from the user.
8. Write a program in C to pass a pointer to a function and modify the original
value.
UNIT-III: Strings
1. Write a program in C to read and print a string.
2. Write a program in C to find the following string operations both with and
without using library functions:
a) Find the length of the string.
b) Copy one string into another.
3. Write a program in C to concatenate two strings and compare two strings.
4. Write a program in C to convert all lowercase letters into uppercase and vice
versa in a string.
5. Write a program in C to count the number of lowercase letters, uppercase
letters, and special symbols in a string.
6. Write a program in C to reverse a string and check whether it is a palindrome or
not.