Unix

1:

 The command line argument   a.out  x  'a  b'  "c  d"

A. is acceptable
B. is acceptable if the double quotes are replaced by single quotes
C. is acceptable if the single quotes arc replaced by double quotes
D. none of the above
 

Answer : A

Explanation :
Any command that is keyed-in will be first processed by the shell, which divides the command into tokens, taking into account the metacharacters. So. a b will be divided into two tokens a and b. But 'a b' or "a b" will pass a b as such (i.e. as one token). So. argv [2] will be 'a b' and argv[3] will be "c d". Hence the answer.

Write your comments here:


Report Error
 

Option: A

Explanation : Explanation will come here. Explanation will come here. Explanation will come here. Explanation will come here. Explanation will come here.