Unix MCQ Questions with Answers #8

1. The statement z=’expr 5/2’ would store in z a value

a. 2.5
b. 3
c. 2
d. 0
 

2. The expression expr -7 % 2evaluates to

a. 1
b. -1
c. -3.5
d. 0
 

3. The expression expr -2 % 7 evaluates to

a. 2
b. -2
c. 0
d. 0.285
 

4. Hierarchy decides which operator

a. Is most important
b. Is used first
c. Is fastest
d. Operates on largest numbers
 

5. The break statement is used to exit from

a. An if statement
b. A for loop
c. A program
d. None of the above
 

6. An until loop ensures that the statement within the loop get executed

a. Only once
b. Atleast once
c. Not even once
d. None of the above
 

7. The cp command uses

a. Standard input file
b. Standard output file
c. Both input and output file
d. Neither input nor output file
 

8. Which option will be used with sort command to start sorting after the nth column of the (m+1)th field

a. –m.n
b. +m.n
c. +n.m+1
d. +(m+1).n
 

9. Which command is used to terminate a process

a. Shutdown
b. Haltsys
c. Cancel
d. Kill
 

10. The command is used to compare the files is known as

a. Comp
b. Cmp
c. Do
d. Ccp

Correct Answers

1. C

2. B

3. B

4. B

5. B

6. D

7. D

8. B

9. D

10. B

See Also

Have a Unix Problem
Do you have a UNIX Question?

Unix Books :-
UNIX Programming, Certification, System Administration, Performance Tuning Reference Books

Return to : - Unix System Administration Hints and Tips

(c) www.gotothings.com All material on this site is Copyright.
Every effort is made to ensure the content integrity.  Information used on this site is at your own risk.
All product names are trademarks of their respective companies.
The site www.gotothings.com is in no way affiliated with or endorsed by any company listed at this site.
Any unauthorised copying or mirroring is prohibited.