Skip to content

Instantly share code, notes, and snippets.

@harshraj22
Last active August 13, 2020 15:39
Show Gist options
  • Save harshraj22/f4005e232536ea46d37db0d21e5edb01 to your computer and use it in GitHub Desktop.
Save harshraj22/f4005e232536ea46d37db0d21e5edb01 to your computer and use it in GitHub Desktop.
MCQ Questions for the first test for internship/ placement.
  1. 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)


  1. 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


  1. 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


  1. 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

  1. Features not available in C++ object oriented programming is
    A. Virtual destructor
    B. Virtual constructor
    C. Virtual function
    D. All
    Answer. B

  1. ____________ members of base class are inaccessible to derived class
    A.Private
    B.Protected
    C.Public
    D.None
    Answer. A

  1. 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

  1. 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

  1. 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

  1. 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
@harshraj22
Copy link
Author

harshraj22 commented Aug 10, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment