McGraw-Hill OnlineMcGraw-Hill Higher EducationLearning Center
Student Center | Instructor Center | information Center | Home
Glossary
Sample Configuration Scripts
Internet Resources
Multiple Choice Quiz
True or False
Feedback
Help Center


Book cover
Introduction to UNIX
Kate Wrightson
Joe Merlino

Shell Programming II - Variables and Flow Control

Multiple Choice

Click on the correct response for each question below.



1

Variable names may not include
A)Numbers
B)Underscores
C)Question marks
D)More than one of the above
2

Variable names may begin with
A)Numbers
B)Underscores
C)Alphabetic characters
D)Both B and C
3

Variable names should be
A)Descriptive
B)Lower case letters
C)Upper case letters
D)Both A and C
4

A common variable type is
A)Array
B)Complex
C)Simple
D)None of the above
5

Array values when assigned must be surrounded by
A)$ signs
B){ } (curly braces)
C)[] (square brackets)
D)( ) (parenthesis)
6

The purpose of the PATH environment variable is
A)Contains the current working directory
B)The sequence of directories to be searched when entering a command
C)Used to change directories
D)None of the above
7

Some lines in an "if statement" are indented because
A)Required by the shell
B)For better readability
C)Both A and B
D)None of the above
8

In "bash", "if" constructs are ended with
A)Fi
B)Endif
C)End
D)None of the above
9

Which of the following is not a iterative construct in "bash"?
A)IF
B)For
C)Until
D)While
10

A loop that continues indefinitely is called a
A)Indefinite loop
B)Non-stop loop
C)Infinite loop
D)None of the above




McGraw-Hill/Irwin