About Me

header ads

C Programming Lab (1BPOPL107/207)

C Programming Lab

Course Code 1BPOPL107/207 
Semester I/II
CIE Marks 50
Teaching Hours/Week (L:T:P:S) 0:0:2:0 
SEE Marks 50
Total Hours of Pedagogy 24 
Total Marks 100
Credits 1 
Exam Hours 3
Examination type (SEE) Practical




PART – A

CONVENTIONAL EXPERIMENTS

Note: Students must write the algorithm & flowchart for PART-A questions in the Record book

1. A robot needs to find how far it must travel between two points on a 2D plane. Develop a C program to calculate the straight-line distance between the given coordinates.

2. Develop a C program that takes a student's marks as input and displays their grade based on the following criteria:

90 and above: Grade A

75 to 89: Grade B

60 to 74: Grade C

50 to 59: Grade D

Below 50: Grade F

Choose a suitable control structure to implement this logic efficiently.

3. Develop a C program that takes a unique identification input like PAN Number, AADHAR_Number,

APAAR_Id, Driving License, Passport and checks it against a set of stored KYC records. Based on the input,

display whether the individual is verified or not. Use an appropriate control structure to handle multiple

possible ID matches. Assume all Unique identification are of integer type.

4. A math app needs to determine the type of roots for a quadratic equation based on user input. Develop a

C program to calculate and display the roots based on the given coefficients.

5. A sensor in a robotic arm needs to calculate the angle of rotation in real-time, but the hardware doesn't

support built-in trigonometric functions. Develop a C program to approximate the value of sin(x) using a series expansion method for improved performance.

6. Develop a C program that accepts a course description string and a keyword from the user. Search whether the keyword exists within the course description using appropriate string functions. If found, display:

"Keyword '<keyword>' found in the course description." Otherwise, display: "Keyword '<keyword>' not found in the course description."

7. Develop a C program that takes marks for three subjects as input. Use a function to check if the student has

passed (minimum 40 marks in each subject). Display the average and whether the student passed or failed.

8. In an ATM system, two account balances need to be swapped temporarily for validation. Develop a C

program that accepts two balances and uses a function with pointers to swap them. Display the balances

before and after swapping.




PART – B

TYPICAL OPEN-ENDED EXPERIMENTS

Open-ended experiments are a type of laboratory activity where the outcome is not predetermined, and

students are given the freedom to explore, design, and conduct the experiment based on the problem

statements as per the concepts defined by the course coordinator. It encourages creativity, critical thinking, and

inquiry-based learning.

1. A college library has a digital bookshelf system where each book is assigned a unique Book ID. The bookshelf

is organized in ascending order of Book IDs. Develop a C Program to quickly find whether a book with a specific Book ID is available in the shelf.

2. A sports teacher has recorded the scores of students in a 100-meter race. To prepare the result sheet, the

teacher wants the scores arranged in descending order (from highest to lowest). Develop a C program to

sort the scores.

3. A small warehouse tracks how many units of different products are shipped from multiple branches.

Another dataset shows how much revenue each product generates per unit. Develop a C program which

combines these datasets to calculate the total revenue generated by each branch.

4. A basic mobile contact manager stores first and last names separately. For displaying full names in the

contact list, you need to join them manually. Additionally, the system must check the length of each full

name to ensure it fits the screen. Perform these operations by developing a C program without using builtin string functions.

5. A currency exchange booth allows users to convert between two currencies. Before confirming the

exchange, the system simulates a swap of the values to preview the result without actually changing the

original data. In other cases, it updates the actual values. Develop a C program that implements both

behaviours using Call by Value and Call by reference

6. A local library needs to store and display details of its books, including title, author, and year of publication.

Design a structure that can hold these details and develop a C program to display a list of all books entered.




Suggested Learning Resources: 

Textbook:

1. Hassan Afyouni, Behrouz A. Forouzan. “A Structured Programming Approach in C”, 4th Edition,

Cengage.



Reference books:

1. Schildt, Herbert. "C the complete reference", 4th Edition, Mc GrawHill.

2. Brian W. Kernighan and Dennis M. Ritchie, The ‘C’ Programming Language, 2nd edition, Prentice Hall of India.


Post a Comment

0 Comments