0% found this document useful (0 votes)
61 views2 pages

Delhi Public School, R.K.Puram, New Delhi

The document contains instructions for students to create C programs using structures. It lists 12 programming assignments involving declaring structures for books, candidates, accounts, flights, and students. The structures have different data types as members. Students need to create menu driven programs with separate functions to enter, display, search, sort and filter data from arrays of these structures. Proper comments and documentation is required with each program. Output samples also need to be included for each program.

Uploaded by

rajat gupta
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)
61 views2 pages

Delhi Public School, R.K.Puram, New Delhi

The document contains instructions for students to create C programs using structures. It lists 12 programming assignments involving declaring structures for books, candidates, accounts, flights, and students. The structures have different data types as members. Students need to create menu driven programs with separate functions to enter, display, search, sort and filter data from arrays of these structures. Proper comments and documentation is required with each program. Output samples also need to be included for each program.

Uploaded by

rajat gupta
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/ 2

Delhi Public School, R.K.

Puram, New Delhi 


Computer Science Practical List 2 
 
**8. Declare a structure BOOK with the following members: 
 
Bno of type int 
Bname of type char array of size 20 
Author of type char array of size 20 
Price of type float 
 
Write a menu driven program with separate functions for each of the following for an array 
of BOOK type: 
● To enter values in the array of BOOK 
● To display the details from an array of BOOK passed through parameter 
● To search for a BOOK from the array upon its Bno and display its details 
● To search for a BOOK from the array upon its Bname and display its details 
 
9. Declare a structure CANDIDATE with the following members: 
 
Cno of type int 
Cname of type char array of size 20 
Score of type int 
 
Write a menu driven program with separate functions for each of the following for an array 
of CANDIDATE type: 
● To allow user to enter values in the array of CANDIDATE 
● To display the array of CANDIDATE 
● To sort the array in ascending order of Score using bubble sort and display the sorted 
array 
 
**10. Declare a structure ACCOUNT with the following members: 
Acno of type int 
Name of type char array of size 20 
Balance of type float 
 
Write a menu driven program with separate functions for each of the following for an ​array 
of ACCOUNT​ type (in each function, pass array ACCOUNT and N - no. of elements as 
parameter): 
To allow user to enter values for the content on an array of ACCOUNT with N elements. 
To display the contents of array of ACCOUNT  
To display the details of all ACCOUNTs from array of ACCOUNT where Balance is > 100000 
 
11.  Declare a structure FLIGHT with the following members: 
Flno of type int 
DepTime of type char array of size 20 
ArrTime of type char array of size 20 
Fare of type float 
 
 

[REF:DPSR/COMP12/2019-2020/06]
Delhi Public School, R.K.Puram, New Delhi 
Write a menu driven program with separate functions for each of the following for an array 
of FLIGHT type: 
To enter values in the array 
To display the details of a FLIGHT passed through parameter 
To return the details of the FLIGHT with the lowest Fare 
 
12. Declare a structure DATE with the following members: 
 
Day of type int 
Month of type int 
Year of type int 
 
Declare another structure STUDENT with the following members: 
 
Admno of type int 
Sname of type char array of size 20 
DOB of type date //represents date of birth 
 
Write a menu driven program with separate functions for each of the following for an array 
of STUDENT type: 
 
● To enter values in the array of STUDENT 
● To display details of a STUDENT from array of STUDENT passed through parameter 
● To display the details of all students from array of STUDENT who are born between  
[1 1 1990] and [31 12 1990] , (both dates inclusive) 
 
 
 
General Instructions: 
i. Type the programs mentioned above during the Lab Periods and save in​ ​the​ R Drive 
 
ii. Type in the following on top of each of your program as comment lines 
/*
Program No : 8
Developed By: Ravi Parekh, Tarini Khan, Priya Shekhar
Date : 07-May-2018
*/

iii. On successful compilation and execution, copy and paste the sample output at the bottom of 
the program as comment lines. 
 
iv.  Take  out  a  hardcopy  of  the  program  from  the  printer  and  get  it  signed  from  the  respective 
computer teacher. Add the printout in the practical file and get the Index entry also signed. 
 
v. The ​**​ marked questions to be written on ​Computer Science Notebooks​ also. 

[REF:DPSR/COMP12/2019-2020/06]

You might also like