Classical

Unix - Filters and Commands

61:  

File x .c has 5 lines of code. The command
date l tee abc l sort - x. c l wc -1, displays

A.

5

B.

6

C.

0

D.

an error message

 
 

Option: B

Explanation :


62:  

Which of the following comments about the signals system call are true?

A.

It takes up two arguments

B.

The first argument is an integer

C.

The second argument is a pointer to a function

D.

All of the above

 
 

Option: D

Explanation :


63:  

 lint can analyze the named source code for

A.

inconsistent usage

B.

non portability

C.

suspicious constructs

D.

All of these 

 
 

Option: D

Explanation :


64:  

Which of the following characteristics of the original process are preserved when, the exec system call is executed

A.

The current working directory

B.

The open files

C.

PID & PPID

D.

All of these

 
 

Option: D

Explanation :


65:  

 Which of the following remarks about lex are true?

A.

It generates a C program

B.

It produces a C code that consumes more memory than a C program that can be written separately to accomplish the same task

C.

It produces a C' code that executes slower than a C program that can be%%ritten separately to accomplish the same task

D.

All of these

 
 

Option: D

Explanation :

The purpose of lex is to generate a 'C' function yylex, that will recognize any pattern that is given as input to lex, as a regular expression. Also, it can perform the specified action (like deleting, printing, changing to some other pattern, enciphering, etc.) when the specified pattern is matched. It does this by converting regular expression into a non deterministic finite state automata- then a finite state automata—then reduces the number of states in it. lex is a program generator, which means we can write our own code, which functions the same as the lex output. Since lex applies a general set of rules to achieve this, what it generates will not make efficient use of memory and is slower too. Yet it is a powerful tool.that simplifies the programmer's job.




Suggest an improvement