Computer Basics

This test consists of 20 questions related to basics of computer, computer programming, database, data structures, operating system etc.

20 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

Which of the following statements is/are true?

  1. Encapsulation means hiding of data from the inside view.
  2. Encapsulation can be achieved by proper use of modifiers.
  3. Abstraction is a process like generalization.
  4. Abstraction Is closely associated with encapsulation.
  5. All of the above are true statements.
Question 2 Multiple Choice (Single Answer)

Which of the following statements is/are true?

  1. Linear search is slow as compared to binary search.
  2. Linear search requires sorted data.
  3. Linear search is not efficient with large data.
  4. The complexity of binary search is O(log n).
  5. Only (1), (3) and (4) are true.
Question 3 Multiple Choice (Single Answer)

Which of the following layout managers in Java is used to manage the components in the directions like north, south, east, west and center?

  1. Border layout
  2. Grid layout
  3. Flow layout
  4. Both (2) and (3)
  5. None of the above
Question 4 Multiple Choice (Single Answer)

Which of the following statements is/are true?

  1. Quick sort requires additional memory as compared to merge sort.
  2. The average case complexity of merge sort is the same as quick sort.
  3. The worst case complexity of quick sort and merge sort are also the same.
  4. All of the above
  5. Only (2) and (3).
Question 5 Multiple Choice (Single Answer)

Which of the following is not a JVM (Java Virtual Machine) exception?

  1. ClassCastException
  2. NullPointerException
  3. ArrayIndexOutOfBoundsException
  4. IllegalArgumentException
  5. None of the above
Question 6 Multiple Choice (Single Answer)

Which method of the BufferedReader class is used to read the characters from the console in java?

  1. readLine()
  2. read()
  3. write()
  4. both (1) and (2)
  5. none of the above
Question 7 Multiple Choice (Single Answer)

Which of the following statements is/are not true?

  1. Throwable is the superclass of all exception classes in Java.
  2. Stack overflow is an example of runtime exception.
  3. Checked exceptions occurr due to user error.
  4. Finally clause is used to free the resources allocated by the methods in the beginning of the program.
  5. All of the above
Question 8 Multiple Choice (Single Answer)

Which of the following is/are true statements?

  1. Overloading occurs in the same class.
  2. In method overriding, the return type of the method is different.
  3. Final methods can not be overridden.
  4. All of the above
  5. Only (1) and (3) are true statements.
Question 9 Multiple Choice (Single Answer)

Which of the following statements is true about composition in object oriented programming?

  1. It determines the relationship between the two objects such as one-to-one, one-to-many etc.
  2. It determines the complexity of the objects after combining them.
  3. It determines the relationship between the objects in a directional line and shows the has-a relationship.
  4. It hides the implementation details of the system.
  5. None of the above
Question 10 Multiple Choice (Single Answer)

Which of the following methods is used to return the primitive value of the boolean object in JavaScript?

  1. valueOf()
  2. toString()
  3. toSource()
  4. both (1) and (2)
  5. none of the above
Question 11 Multiple Choice (Single Answer)

What is the role of control unit in CPU?

  1. It is responsible for the communication among the input/output devices, obtains the instruction from memory and manage all the units of the computer.
  2. It does not store data.
  3. It is responsible for arithmetic operations in the computer.
  4. Only (1) and (2)
  5. (1), (2) and (3) all are true.
Question 12 Multiple Choice (Single Answer)

Which of the following dialog boxes in JavaScript is used to get user input to proceed further?

  1. Prompt dialog box
  2. Alert dialog box
  3. Confirm dialog box
  4. Both (1) and (3)
  5. None of the above
Question 13 Multiple Choice (Single Answer)

Which of the following statements is/are true?

  1. TreeMap is the class of Map interface.
  2. HashMap inherits SortedMap interface.
  3. HashMap is not synchronised.
  4. Only (1) and (3) are true.
  5. (1), (2) and (3) all are true.
Question 14 Multiple Choice (Single Answer)

Which of the following is true about wrapper classes in Java?

  1. The wrapper classes do not contain any constructor.
  2. All the methods of a wrapper class are static in nature.
  3. The wrapper class for float is java.lang.Float.
  4. Wrapper classes are contained in java.lang package.
  5. All of the above
Question 15 Multiple Choice (Single Answer)

Which of the following statements is/are true?

  1. Asymmetric key encryption provides message authentication.
  2. Symmetric key encryption uses less computer resources.
  3. Symmetric key encryption has too many keys.
  4. All of the above
  5. Only (1) and (2) are true.
Question 16 Multiple Choice (Single Answer)

Which of the following methods of the dictionary class in collection framework returns the value to which the key is mapped in the dictionary?

  1. abstract V get(Object key)
  2. abstract V put(K key, V value)
  3. abstract Enumeration<k> keys() </k>
  4. abstract int size()
  5. none of the above
Question 17 Multiple Choice (Single Answer)

Which of the following is/are the advantages of Database Management System?

  1. It provides consistency in data.
  2. It provides concurrency control.
  3. It provides security of data.
  4. It reduces redundancy of data.
  5. All of the above
Question 18 Multiple Choice (Single Answer)

What is throughput in operating system?

  1. It is the total number of processes executed per time unit.
  2. It is the total time taken by the process from submission to its completion.
  3. It is the time taken by a the first response produced from the request was submitted.
  4. It is the time taken by the process to remain in the ready queue.
  5. None of the above
Question 19 Multiple Choice (Single Answer)

Which of the following statements is/are true?

  1. A digital certificate is used to identify the authentication of a user.
  2. A digital certificate uses public key.
  3. A digital signature is used to verify the data.
  4. Credit card is an example of digital certificate.
  5. All of the above
Question 20 Multiple Choice (Single Answer)

Which of the following classes does not belong to java.util package?

  1. HashMap
  2. HashSet
  3. Dictionary
  4. BufferredReader
  5. None of the above