- A process executes the code
fork ();
fork ();
fork ();
The total number of child processes created is
(A) 3
(B) 4
(C) 7
(D) 8
Answer (C)
- Consider the following statements about user level threads and kernel level threads. Which one of the following statement is FALSE?
(A) Context switch time is longer for kernel level threads than for user level threads.
(B) User level threads do not need any hardware support.
(C) Related kernel level threads can be scheduled on different processors in a multi-processor system.
(D) Blocking one kernel level thread blocks all related threads.
Answer (D) Since kernel level threads are managed by kernel, blocking one thread doesn’t cause all related threads to block. It’s a problem with user level threads
- Database table by name Loan_Records is given below.
Borrower Bank_Manager Loan_Amount
Ramesh Sunderajan 10000.00
Suresh Ramgopal 5000.00
Mahesh Sunderajan 7000.00
What is the output of the following SQL query?
SELECT Count(*)
FROM ( ( SELECT Borrower, Bank_Manager
FROM Loan_Records) AS S
NATURAL JOIN ( SELECT Bank_Manager, Loan_Amount
FROM Loan_Records) AS T );
A. 3
B. 9
C. 5
D. 6
Answer. C
- The candidate key is that you choose to identify each row uniquely is called ……………..
A) Alternate Key
B) Primary Key
C) Foreign Key
D) None of the above
Answer. B
- Features not available in C++ object oriented programming is
A. Virtual destructor
B. Virtual constructor
C. Virtual function
D. All
Answer. B
- ____________ members of base class are inaccessible to derived class
A.Private
B.Protected
C.Public
D.None
Answer. A
- If different properties and functions of a real world entity is grouped or embedded into a single element, what is it called in OOP language?
A. Inheritance
B. Polymorphism
C. Abstraction
D. Encapsulation
Answer. D
- What is common in three different types of traversals (Inorder, Preorder and Postorder)?
A. Root is visited before right subtree
B. Left subtree is always visited before right subtree
C. Root is visited after left subtree
D. All of the above
E. None
Answer. B
- Which of the following sorting algorithms in its typical implementation gives best performance when applied on an array which is sorted or almost sorted (maximum 1 or two elements are misplaced).
A. Quick Sort
B. Heap Sort
C. Merge Sort
D. Insertion Sort
Answer. D
- What is the worst case time complexity for search, insert and delete operations in a general Binary Search Tree?
A. O(n) for all
B. O(Logn) for all
C. O(Logn) for search and insert, and O(n) for delete
D. O(Logn) for search, and O(n) for insert and delete
Answer. A
These are the questions for first MCQ test. I have tried to make it balanced, ensuring the questions touch upon the basic concepts from frequently asked topics of CS fundamentals. I have tried to make it relevant for students sitting for internships as well.