Unix

1:

cat/dev/tty

A.

Throws garbage onto the terminal 1.

B.

Just echoes what you type. line by line

C.

Terminates if one types control at the beginning of a line

D.

Both (b) & (c)

 

Answer : D

Explanation :

First, the i-node number corresponding to idevi tty (i.e. the terminal currently used) is procured. Then the i-node is accessed. From it, the system understands, it is a character special file. So, whatever you type, if followed by ' n ' will he echoed in the terminal. Typing control d, also lushes the buffer contents to t ty. But unlike 'control d is not transmitted. So. if you type ab ( Ad) cd ( Ad) first ab will be immediately transmitted, then cd will be transmitted. Whenever you press control d. then what you have typed between the previous control d (or from the start of the current line) to the current control d will be transmitted. So. if you type two control d consecutively or a single control d. at the beginning of a line then you are telling it to transmit. but nothing is there to be transmitted. So. the command gets terminated.

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.