Quiz - Grade 8

10 Questions | Total Attempts: 44

SettingsSettingsSettings
Please wait...
Quiz - Grade 8

.


Questions and Answers
  • 1. 
    Upload your response
  • 2. 
    What are the three types of array?
  • 3. 
    It can store one or more values in a single variable name.
    • A. 

      Array

    • B. 

      Variable

    • C. 

      Constant

    • D. 

      Loops

  • 4. 
    Each element in the array is not assigned its own ID so that it can't be easily accessed
    • A. 

      True

    • B. 

      False

  • 5. 
    What is the main syntax of declaring arrays in php
  • 6. 
    It stores each element with a numeric ID key
    • A. 

      Associative Array

    • B. 

      Numeric Array

    • C. 

      Multidimensional Array

  • 7. 
    What are the three ways in writing a numeric array. There are 3 possible answers.
    • A. 

      $names = array("Bea","Lexter","Simon");

    • B. 

      $names = {1,2,3,4,5}

    • C. 

      Int[] names = $array();

    • D. 

      $names[0] = "Ed Michael"; $names[1] = "Joyner"; $names[2] = "Vicente";

    • E. 

      $names[0] = "Peter"; $names[1] = "Quagmire"; $names[2] = "Joe"; echo $names[1] . " and " . $names[2] . " are ". $names[0] . "'s neighbors";

  • 8. 
     Each ID key is associated with a value.
    • A. 

      Associative Array

    • B. 

      Numeric Array

    • C. 

      Multidimensional Array

  • 9. 
    Each element in the main array can also be an array and each element in the sub-array can be an array, and so on
    • A. 

      Associative Array

    • B. 

      Numeric Array

    • C. 

      Multidimensional Array

  • 10. 
    Write the ECHO output of the following code below.<?php$names[0] = "Peter";$names[1] = "Quagmire";$names[2] = "Joe";echo $names[2] . " and " . $names[0] . " are ". $names[1] . "'s neighbors";?> 
Back to Top Back to top