Alien head

Computer Basics

Description: This test consists of 20 questions related to basics of computer, computer programming, database, data structures, operating system etc.
Number of Questions: 20
Created by:
Tags: computer programming database OS Computer Basics
Attempted 0/20 Correct 0 Score 0

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.


Correct Option: E
Explanation:

Yes, this is the right option.

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.


Correct Option: E
Explanation:

Yes, these statements are true.

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


Correct Option: A
Explanation:

Border layout positioned the components of the container in the north, south, east, west and center direction.

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


Correct Option: B
Explanation:

Both have the same complexity O(N log N), where N is the number of comparisons.

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


Correct Option: D
Explanation:

This is not a JVM exception. It is a programmatic exception.

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


Correct Option: B
Explanation:

This method of the BufferedReader class is used to read a character from the console.

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


Correct Option: B
Explanation:

This is a false statement as it is not an exception. It is an error.

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.


Correct Option: E
Explanation:

Yes, both of these are true.

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


Correct Option: B
Explanation:

This is true about composition and it is the more restrictive form of aggregation.

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


Correct Option: A
Explanation:

Yes, this method is used to return the primitive value of the boolean object.

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.


Correct Option: E
Explanation:

Yes, all the there are correct.

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


Correct Option: A
Explanation:

A prompt dialog box is used if you want the user to input a value before entering a page. When a prompt box pops up, the user will have to click either OK or cancel to proceed after entering an input value.A prompt dialog box is used if you want the user to input a value before entering a page. When a prompt box pops up, the user will have to click either OK or cancel to proceed after entering an input value. A prompt dialog box is used if you want the user to input a value before entering a page. When a prompt box pops up, the user will have to click either OK or cancel to proceed after entering an input value.

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.


Correct Option: D
Explanation:

Yes, both the statements are true.

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


Correct Option: E
Explanation:

Yes, all of the above defines the properties of wrapper class in java.

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.


Correct Option: D
Explanation:

All of the above are correct statements.

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 keys()

  4. abstract int size()

  5. none of the above


Correct Option: A
Explanation:

Yes, this method is used to return the value to which the key is mapped in the dictionary.

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


Correct Option: E
Explanation:

All of the above statements are true.

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


Correct Option: A
Explanation:

It is called 'throughput'.

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


Correct Option: E
Explanation:

All the statements are correct.

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


Correct Option: D
Explanation:

This class belongs to java.io package.

+ View questions