Arrays and Data Files
Document Preview:
Arrays and Data Files Questions 1–20: Select the one best answer to each question. 1. Which of the following is not true with regards to the following statement? NAME=John+Doe&Serial=123456&System=M A. Data was collected via an online form from a Macintosh computer. B. Data was sent to the server when the user pressed the Submit button. C. Data was processed by a CGI script. D. Data was sent to the server using the GET method. 2. A/An _______ is a unique number that distinguishes one scalar variable from another in an array. A. array variable C. key B. primary key D. index 3. In the following expression, what would be used to separate list values? my arrayname = (list) A. ; C. : B. , D. | 4. Which of the following marks the beginning of a hash name? A. @ C. $ B. % D. # 5. Which of the following is not true of scalar variables? A. In an array, scalar variables are stored in order in the computer’s memory. B. In a hash, scalar variables are stored in order in the computer’s memory. C. A scalar variable contained in a hash starts with a $. D. Scalar variables are assigned keys when the hash is created in the computer’s memory. 6. Which of the following statements is not an example of a repetition structure that instructs the computer to repeat a block of instructions? A. foreach C. Nested foreach B. for D. while 7. Which of the following is used by the for statement to keep track of the number of times the loop instructions have been processed? A. Repetition variable C. Counter condition B. Loop variable D. Counter variables 8. Which of the following is used to allow a script to read data stored in a file? A. < C. >> B. > D. > and >> 9. Which of the following places an invisible newline character at the end of a record? A. |n C. \n B. \t D. n; 10. Which of the following is the angle operator in Perl? A. {} C. ^^ B. <> D. !? 11. Which of the following syntax statements would write a record to an open file? A. print...
10 years ago
Purchase the answer to view it
- arrays_and_data_files.docx