BEGIN FindDogOwner (req_microchipno, req_ownername)
found = false
open (Owner) indexed by microchipno
read (Owner) microchipno, ownername
WHILE not found OR not end of file
IF microchipno = req_microchipno THEN
req_ownername = ownername
found = true
ENDIF
read (Owner) microchipno, ownername
ENDWHILE
IF not found THEN
print 'no owner recorded'
ELSE
print 'owner is '; ownername
ENDIF
END
Question: What type of variable is 'found'?
(A) A constant
(B) A flag
(C) A string
(D) A trigger
---
Just post either A, B, C or D depending on what you think/know the answer is. I'm going over HSC tests from previous years, and found the answer they said for this one to be different to what I thought. I'll post it after some replies.
Also, HSC stands for "High School Certificate", it's Australian. It would be equivalent to whatever the most important exam you do in High School in America/Canada/etc..
Secret answer E) a boolean variable.
Boolean was my first thoughts when reading the question, before seeing the choices. But unfortunately it's not it.
I'd think it was a trigger.
The answer I put down was trigger. (I just opened notepad and did the first 20 questions to see what I'd get).
But the HSC says it's a flag? I would of assumed a flag would be a Integer/Long (.. if anything). Can anyone fiqure out why it's a flag?
Question 13 (page 7):
http://www.boardofstudies.nsw.edu.au/hsc_exams/hsc2001exams/pdf_doc/software_design_developm_01.pdf
Answers (page 6):
http://www.boardofstudies.nsw.edu.au/hsc_exams/hsc2001exams/pdf_doc/software_design_dev_er01.pdf
flags are booleans
Quote from: Banana fanna fo fanna on May 22, 2006, 11:14 PM
flags are booleans
Oh, ok.
Are triggers anything, or just part of the 'fake' answers?
[EDIT] Note:
Anything as in some form of data type, or some programming term.