Unix - Filters and Commands

81:  

Which of the following displays the exit status of the last executed command?

A.

echo $4

B.

echo $$

C.

echo $?

D.

echo $!

 
 

Option: C

Explanation :

Click on Discuss to view users comments.

Write your comments here:



82:  

Which of the following file names cannot be displayed if la ls* is run?

A.

.x

B.

?x

C.

Both (a) & (b)

D.

hidden

 
 

Option: C

Explanation :

• is a metacharacter that matches with any file in the current directory. other than those starting with a .(dot) .?x can't be a file name. If you try to create such a tile, say with vi ?x command,? will be interpreted as a metacharacter, and so expanded by shell, if matched.

Click on Discuss to view users comments.

Write your comments here:



83:  

 Which of the following initiates the sequence of events that ultimately allows a user to login?

A.

clri

B.

sync

C.

login

D.

init

 
 

Option: D

Explanation :

Click on Discuss to view users comments.

Write your comments here:



84:  

 getc (stdin)

A.

results in run time error

B.

results in syntax error

C.

is equivalent to get char ( )

D.

none of the above

 
 

Option: C

Explanation :

stdin is a pointer to the standard input file (i.e. keyboard by default ) which is available to any program in open mode. So. getc(stdin) is syntactically correct and means reading from a keyboard which is what getchar () does. In fact getc ( ) is implemented as a macro (rather than as a function)

Click on Discuss to view users comments.

Write your comments here:



85:  

 Which of the following is not the work of a C-preprocessor?

A.

Macro expansion

B.

File inclusion

C.

Conditional compilation

D.

None of the above

 
 

Option: D

Explanation :

Click on Discuss to view users comments.

Write your comments here: