0% found this document useful (0 votes)
21 views

C Programming Lab6

C program question
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views

C Programming Lab6

C program question
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Department of Computer Science and Engineering

Branch: B. Tech (CSE/ECE/MAE/MNC) Semester: 1st


Course Name: C Programming Lab Course code: CS110
Maximum Time: 2 hours Date: 18/10/2024

1. Create a structure name called "Student" with member’s name, age, and total marks. Write
a C program to input data for two students, display their information, and find the average
of total marks.
2. Create a structure named "Employee" to store employee details such as employee ID,
name, and salary. Write a program to input data for three employees, find the highest
salary employee, and display their information.
3. How to pass a structure member as an argument of a function? Write a program to explain
it using call by value and call by reference.
4. Write a C program to calculate student-wise total marks for three students using array of
structure.
5. Write a C program using structure to create a library catalogue with the following fields:
Access number, author’s name, Title of the book, year of publication, publisher’s name,
and price.
6. What is self- referential structure? Explain through example.
7. Write a C program to store 5 Student records as Structures and Sort them by Name. for
example:
Input: Student Records= {
{Id = 1, Name = bd, Age = 12 },
{Id = 2, Name = ba, Age = 10 },
{Id = 3, Name = bc, Age = 8 },
{Id = 4, Name = aaz, Age = 9 },
{Id = 5, Name = az, Age = 10 } }

Output:
{{Id = 4, Name = aaz, Age = 9 },
{Id = 5, Name = az, Age = 10 },
{Id = 2, Name = ba, Age = 10 },
{Id = 3, Name = bc, Age = 8 },
{Id = 1, Name = bd, Age = 12 } }

You might also like