ANZ Solved Model Question Paper-Technical Questions in UNIX and C
1. Which symbol will be used with grep command to match the pattern pat at the beginning of a line?
A. ^pat
B. $pat
C. pat$
D. pat^
E. None of the above
2. Which command is used to sort the lines of data in a file in reverse order
A. sort
B. sh
C. st
D. sort -r
E. None of the above
3. Which command is used to display the top of the file?
A. cat
B. head
C. more
D. grep
E. None of the above
4. Which command is used to copy all files having the string chap and any two characters after that to the progs directory?
A. cp chap?? progs
B. cp chap* progs
C. cp chap[12] /progs/*.*
D. cp chap?? /progs/*
E. None of the above
5. Which command is used to change protection mode of files starting with the string emp and ending with 1,2, or 3?
A. chmod u+x emp[l-3]
B. chmod 777 emp*
C. chmod u+r ??? emp
D. chmod 222 emp?
E. None of the above
6. Which command is used to remove a directory?
A. rd
B. rmdir
C. dldir
D. rdir
E. None of the above
7. Which of the following type of class allows only one object of it to be created?
A. Virtual class
B. Abstract class
C. Singleton class
D. Friend class
8. Which of the following is not a type of constructor?
A. Copy constructor
B. Friend constructor
C. Default constructor
D. Parameterized constructor
9. Which of the following statements is correct?
A. Base class pointer cannot point to derived class.
B. Derived class pointer cannot point to base class.
C. Pointer to derived class cannot be created.
D. Pointer to base class cannot be created.
10. Which of the following is not the member of class?
A. Static function
B. Friend function
C. Const function
D. Virtual function
11. Which of the following concepts means determining at runtime what method to invoke?
A. Data hiding
B. Dynamic Typing
C. Dynamic binding
D. Dynamic loading
12.Which of the following term is used for a function defined inside a class?
A. Member Variable
B. Member function
C. Class function
D. Classic function
13.Which of the following concept of oops allows compiler to insert arguments in a function call if it is not specified?
A. Call by value
B. Call by reference
C. Default arguments
D. Call by pointer
14.How many instances of an abstract class can be created?
A. 1
B. 5
C. 13
D. 0
15.Which of the following cannot be friend?
A. Function
B. Class
C. Object
D. Operator function