ACP Programs List
ACP Programs List
Sangha’s
Basaveshwar Engineering College (Autonomous), Bagalkot
List of programs
1. Write a C program to read the quantity of rain (in inch) that occurred in three different cities (C1,
C2 & C3) for the four consecutive days (D1, D2, D3 and D4) at five different time durations (T1,
T2, T3, T4 and T5). Also calculate the average of rain that occurred per day and per time duration
for each city. Use user-defined functions to: read and print the quantity of rain, calculate the
average of rain that occurred per day and per time duration for every city and print it.
2. Write a C program to find the following using recursion. Read the input using command line
arguments. (Use functions)
a. Factorial of a number
b. Fibonacci of a number
3. Write a C program to perform the following operations on string
a. Reverse the input string and check whether it is a palindrome or not.
b. Concatenate the input string and the reversed string
c. Count the number of times a given character has occurred in the input string.
4. Write a C program to search for a character and a substring in the input string and display
meaningful results (i.e., location).
5. Write a C program to create a structure “Faculty” to include faculty details (name, id, along with
their students details (name, roll_no, marks scored in 5 subjects out of 100) defined as structure
“Student”. Read the faculty information and their respective student’s information, calculate the
average marks scored by each student under a particular faculty and display the results. (Use
nested structures)
6. Write a C program to read and compare the two fractions defined as structures and display
meaningful results. (0 if f1=f2, -1 if f1<f2 and +1 if f1>f2) (Use functions)
7. Write a C program to read the N elements of the one-dimensional array and print them in forward
and reverse direction using pointers. Also find their average. (Use pointers)
8. a. Write a C program to read the details of a structure “Student” (name, roll_no, marks scored in 5
subjects out of 100), compute the average and display the student’s detail using dynamic memory
allocation.
b. Write a C program to read N names from the user and allocate memory dynamically. Also
display the names with meaningful message.
9. Write a C program to perform the following operations using bitwise operators on fixed size
integers of 16 bit length.
a. Bitwise and, inclusive or, exclusive or, not
b. Left shift, right shift, left rotation and right rotation by specific bits
c. Display the results of every operation in hexadecimal and binary.
10. Write a C program to create two text files of integers and merge them. Display the contents of
merged file to the user and verify the content with the original files.
11. Write a C program to create a text file of characters and copy it to another file. Also count the
number of characters in the input file and display it.
12. Write a C program to create a binary file of students information (roll_no, name, marks scored in 3
CIE), compute the average and the display the contents to the user.
**********
List of programs
List of programs
/* C PROGRAM */
#include<stdio.h>
int main()
{
printf("HELLO WORLD");
return (0);
}
/* Output */
HELLO WORLD