Uploaded by anu ranji

WORKSHEET PAPER 3 CS 19.09

advertisement
WORKSHEET – PAPER 3
SUBJECT: COMPUTER SCIENCE (A LEVEL)
DATE :
19.09.2023
1. Consider the following user-defined data type:
TYPE SchoolDet
DECLARE SchoolName
: String
DECLARE Schoolnum
: Integer
ENDTYPE
a) Write a pseudocode statement to declare a variable, SchoolSection, of type
SchoolDet.
b) Write a pseudocode statement that assigns ‘TWS’ to the SchoolName.
c) Write a pseudocode statement that assigns 11011 to the Schoolnum.
2. Choose an appropriate data type for the following situations. Give the reason for
your choice in each case.
a) A fixed number of colours to choose from.
b) Data about each house that an estate agent has for sale.
c) The addresses of integer data held in main memory.
3. Define, using pseudocode, the following enumerated data types:
a. DateofBirth to hold data of the students in school.
b. DateofJoining to hold details regarding the joining date
4. Differentiate sequential file and direct file access methods.
5. Explain the process of direct access to a record in a file using a hashing algorithm.
a) A) Using the pseudocode declarations below, identify an
enumerated data type
b) a composite data type
c) a non-composite data type
d) a user-defined data type.
B) Write pseudocode to declare a variable Journal of type TJournalRecord and assign the
following values to the variable.
a) Title – Spring Flowers
b) Author – H Williams
c) Publisher – XYZ Press
d) Number of pages – 40
e) Season – Spring
Download