0% found this document useful (0 votes)
21 views1 page

PPL Question Bank Unit 6 2024-25

The document is a question bank for Unit 6 of a course covering structures, unions, and enumerations in C programming for the academic year 2024-25. It includes various questions related to defining, declaring, and initializing structures, as well as comparisons between structures and unions, and practical programming tasks. The questions are categorized by marks and cover a range of topics from basic definitions to complex programming exercises.

Uploaded by

1.maths.care
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 views1 page

PPL Question Bank Unit 6 2024-25

The document is a question bank for Unit 6 of a course covering structures, unions, and enumerations in C programming for the academic year 2024-25. It includes various questions related to defining, declaring, and initializing structures, as well as comparisons between structures and unions, and practical programming tasks. The questions are categorized by marks and cover a range of topics from basic definitions to complex programming exercises.

Uploaded by

1.maths.care
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

PPLQuestion Bank Unit 6 2024-25

Unit No: 6 Sr No. Marks Questions CO BL PI


1 What is a structure in C? 6 1
2 Compare structure and union. 6 1
3 How to declare structure variables? 6 1
4 How to access structure members? 6 1
5 How to declare an array of structures and access its members. 6 1
6 Write a syntax and example to declare a Structure. 6 1
7 How structure members are accessed? Illustrate with suitable example. 6 1
Write structure definition for a student containing members examno, name and an
8 6
array for storing marks of five subjects. 2
2 Marks
9 Define the term structure and declare a structure for Bank account. 6 2
Write a statement to declare a structure variable for an already defined structure struct
10 6
Student. Demonstrate the use of typedef. 2
11 What is the difference between an array and a structure? 6 1
12 Define a structure called Book to store a book’s title, author, and price. 6 2
How do you define a structure that contains an integer, a float, and a character array in
13 6
C? 2
14 Define union in C programming and its advantage. 6 1
15 Define Enumeration in C programming and its advantage. 6 1
Unit No: 6 Sr No. Marks Questions CO BL PI
1 Explain Structure initialization with suitable example. 6 1
2 Discuss the difference between arrays and structures 6 1
Create a structure named Book to store book details like title, author, and price. Write
3 6
a C program to input details for one book, and display their information 3
4 How to initialize structures in C? Write a C Program to display the content. 6 2
Create a structure StudentData with three data members stu_name, stu_id,stu_age to
5 6
store the student name, id, and age.Store and display data for 1 student. 3
Describe the concept of a structure in C programming. Explain how structures are
6 6
defined . Provide an example to illustrate your explanation. 2
Define a structure in C named Time with members hours, minutes, and
7 6
seconds.Create 2 variables of Time structure. 3
8 Define a structure in C? Write the syntax for structure declaration with an example. 6 1
4 Marks
Declare the C structures for the following scenario: (i) College contains the following
fields: College code (2 characters), College Name, year of establishment, number of
9 6
courses. (ii) Each course is associated with course name (String), duration, number of
students. (A College can offer 1 to 50 such courses) 2
Define a structure type personal, that would contain person name, date of joining and
10 6
salary. Write a program to initialize one person data and display the same. 3
How to access the data for structure variables using member operator (DOT
11 6
operator)? Explain with an example. 2
12 Write a C program to define an enumeration for the months of the year. 6 3
13 Write and example program to demonstrate working of enum in C 6 3
14 Write a C program to define an enumeration for the months of the week. 6 3
15 Write a structure and union for car having members name and price. 6 3
Unit No: 6 Sr No. Marks Questions CO BL PI
1 Illustrate the concept of structure data type in C with a suitable example. 6 2
Create a structure called "Student" with members name, age, and total marks. Write a
2 C program to input data for two students, display their information, and find the 6 3
average of total marks.

3 Write a program to maintain a record of 5 employees detail using an array of 6 3


structures with three fields(id, name , salary) and print the details of employees.
Write a program to create a structure for an account holder in a bank with the
4 following Fields: name, account number, address, balance, and display the details of 6 3
two account holders.
5 Explain the concept of array of structures with suitable example. 6 3
Explain the concept of structure and structure initialization with a suitable example
6 6 3
and write a C program for the same.
Using structure write a program to read and display information about
7 6 3
book(title,pages,price)
8 6 3
WAP in C to store and print information of multiple employees using structures.
Define a structure named "Date" with members day, month, and year. Write a C
9 8 Marks 6 3
program to input two dates and display them.
Design a structure named "Car" to store details like car ID, model, and rental rate per
10 6 3
day. Write a C program to input data for three cars,display the details of cars.
Create a structure named "Employee" to store employee details such as employee ID,
11 name, and salary. Write a program to input data for three employees and display their 6 3
information.
Write a C program to create structure carstruct and union carunion for car having
12 members name and price. Diplay the memory utilized by the sturcture and union 6 3
created.
Differntiate between Structure and Union and write a program in C to demonstrate the
13 6 3
memory untilization by the structure and union. Enlist an application of union in C.
Define a structure in C to store information about a student (roll number, name, marks in three
subjects). Write a program to: 1. Accept details of 5 students. 2. Calculate the total and
14 6 3
average marks for each student. 3. Display the student details along with their total and
average marks.
Define a structure in C to store information about an employee (Employee ID, Name, and
Salary). Write a program to:
15 6 3
1.Initialize details of 3 employees.
2.Display the details of all employees.

You might also like