March 2002
Beginner
504 pages
10h 47m
English
| 1: | Which of the following are valid variable names?
|
| A1: | (a) and (d) are valid variable names. (b) starts with a number thus it is invalid. (c) contains the & character, which is not a valid character for variable names. |
| 2: | Is the following sequence of array assignments valid in sh, ksh, and bash?$ adams[0]=hitchhikers_guide $ adams[1]=restaurant $ adams[3]=thanks_for_all_the_fish $ adams[42]=life_universe_everything $ adams[5]=mostly_harmless |
| A2: | These assignments are valid in ksh, bash, and zsh, but not in Bourne shell. Bourne shell only supports scalar variables. |
| 3: | Given the preceding array assignments, how would you access the array item at index 5 in the array adams? How would you ... |
Read now
Unlock full access