FIT1045 Test

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/5

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 6:57 AM on 5/25/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

6 Terms

1
New cards

Write the code to declare a struct to store a single Test:

knowt flashcard image
2
New cards

Write a procedure to output/write a single Test to the terminal in the format shown in the example output on page 4. The procedure must accept a Test as a parameter using your struct from Q2.

knowt flashcard image
3
New cards

Write a function to input/read a single Test from the user, as shown in the example output on page 4. This function must have no parameters, and return Test data using your struct from Q2.

knowt flashcard image
4
New cards

In the space below write a function to find a Test in an array. This will be passed 2 parameters: ○) a prompt string ○) a dynamic array of Test values The function will return an integer. It will: ● Output the prompt (using write_line) ● Ask the user for the id of the Test to find (using read_integer). ● Search the array, and when a Test with a matching id is found, its index in the array will be returned. ● If the search ends without finding a matching Test, then the function returns -1.

knowt flashcard image
5
New cards

In the space below write a function to calculate the average Score from an array of Tests (using your struct from Q2). It will be passed the array as a parameter, and return a double.

knowt flashcard image
6
New cards