User Input and Oracle scripting - Quiz Explanation

The answers you selected are indicated below, along with text that explains the correct answers.
 
1. How does @ differ from @@ when it comes to executing a script?
Please select the best answer.
  A. @ executes a script just once, while @@ may be used to execute it twice. The number of @ symbols controls the number of iterations.
  B. @@ causes SQL*Plus to look for the script in the directory containing the parent script, while @ causes SQL*Plus to start looking in the current working directory.
  C. @@ causes SQL*Plus to use the specially defined SQL*Plus search path, while the @ sign causes SQL*Plus to look only in the current working directory.
  D. @@ allows you to run scripts that prompt the user for input and that use substitution variables. @ only allows you to run non-interactive scripts.
  The correct answer is B. The @@ command was designed for use in scripts that must invoke other, related, scripts. The premise is that you will store related scripts in the same directory. When one script uses @@ to invoke another, SQL*Plus begins searching in the directory containing the parent script. Using @ causes SQL*Plus to start looking in the current working directory.

2. What characters mark the beginning and the end of a substitution variable?
Please select the best answer.
  A. The ampersand (&) and the period (.)
  B. The dollar-sign ($) and the period (.)
  C. The ampersand (&) and the forward-slash (/)
  D. The percent-sign (%) and the period (.)
  The correct answer is A. The ampersand and the period delimit a substitution variable name. Remember that the period is optional in cases where the end of the name is unambiguous.

3. What does SQL*Plus do when it encounters a substitution variable?
Please select the best answer.
  A. It always prompts you for a value, defines the variable with that value, and stores that value in the database.
  B. It attempts to retrieve the variable's value from the database, prompts you for a value if none was found in the database, and then uses that value in the command or SQL statement.
  C. It displays the statement for you to look at, allows you to edit that statement, and executes the result.
  D. It checks to see if the variable has been defined, prompts you for a value if it hasn't been defined, and then uses that value in the command or SQL statement.
  The correct answer is D. Substitution variables provide a mechanism for you to supply input to a SQL*Plus script at runtime. If SQL*Plus encounters a variable that has not been previously defined, it will prompt you to supply a value. If you've used the ACCEPT command to define a variable, SQL*Plus will recognize that, and will use the value that was accepted without prompting you again.

4. Which of the following commands will display text to a user who is running a SQL*Plus script?
Please select the best answer.
  A. MESSAGE "Only the DBA should run this script!"
  B. DISPLAY "Only the DBA should run this script!"
  C. PROMPT "Only the DBA should run this script!"
  D. PRINT "Only the DBA should run this script!"
  The correct answer is C. Use the PROMPT command to display messages to the user. The other commands are not real SQL*Plus commands.

5. Which of the following commands will prompt the user for a table name?
Please select the best answer.
  A. ACCEPT table_name PROMPT "Enter a table name >"
  B. PROMPT "Enter a table name >" ACCEPT table_name
  C. INPUT table_name PROMPT "Enter a table name >"
  D. ACCEPT table_name FROM USER WITH "Enter a table name >"
  The correct answer is A. The ACCEPT command is used to prompt a user for input. In this example, the PROMPT clause has been used to supply a user-friendly prompt.