NEW
Font size
WorksheetsSDD HSC Quiz 5A Q1-10
Total questions: 10
Worksheet time: 5mins
If a digit is defined in EBNF to be 1|2|3|4|5. A syntactically correct HiNum is:
HELLO/1/2/1/BYE
HELLO1232/BYE
HELLO1/2/3/4BYE
HELLO1/2/3/BYE
A data structure is declared in Pascal using the following statements. Which of the following is correct?
An array of records exists called ThisThat. It contains six data items.
Each record of type ThisThat will contain six data items.
A variable declared with type ThisThat will be an array with 3 records.
A variable of type ThisThat will contain two records. Each record containing three fields.
What is the purpose of the following fragment of Visual Basic code:
A loop counts from 1 to 1000. 1000 random numbers are totalled. Each number is either a 0 or a 1.
The number of 0s and the number of 1s generated is calculated for 1000 random numbers. Each random number can be either a 0 or a 1.
One thousand 0s and 1s are generated. The total of all the 0s is stored in Total(0) and the total of all the 1s in Total(1).
1000 random numbers from 0 to 1 are generated. Each number is added to the total after it is generated.
