0

Basics of Computer Languages

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

Which of the following is a true statement in java?

  1. Static block is always executed when the JVM loads the class in java.

  2. Static method can be synchronized in java.

  3. We can throw exception in a static block.

  4. All of the above are true.

  5. Only (1) and (3) are true.


Correct Option: D
Explanation:

Yes, all of the above are the true statement in java.

Which of the following statement(s) is/are true in java?

  1. An interface can not have static method in java.

  2. We can declare abstract class without any abstract method in java.

  3. If we declare main method as private in java then the program will compile.

  4. All of the above.

  5. Only (1) and (3) are true.


Correct Option: D
Explanation:

Yes, all of the above are the true statements in java.

Which of the following method of the HashMap returns the number of number of key-value mappings in the map?

  1. Set entrySet()

  2. Set keySet()

  3. int size()

  4. boolean isEmpty()

  5. None of the above


Correct Option: C
Explanation:

This method is used to return the number of key-value mappings in this map.

Which of the following constructor of the HashMap gives NullPointerException in the java collection framework?

  1. HashMap (Map m)

  2. HashMap (int initialCapacity)

  3. HashMap(int initialCapacity, float loadFactor)

  4. HashMap()

  5. None of the above


Correct Option: A
Explanation:

This constructor of the HashMap will give NullPointerException, if the specified map is null.

Which of the database schema represents the data as a set of relations?

  1. Physical data level

  2. External data level

  3. Conceptual data level

  4. Both (1) and (2)

  5. None of the above


Correct Option: B
Explanation:

Yes, this level represents the data as set of relations. It specifies the view of the data at the conceptual level.

What is the meaning of 'out' in System.out.println in java?

  1. It is a class in java.lang package.

  2. It is a static object of PrintStream class.

  3. It is a method in the PrintStream class.

  4. It is a reference variable of the System class.

  5. Both (2) and (4).


Correct Option: E
Explanation:

This is the correct choice.

Which of the following is/are the example of web server?

  1. IIS (Internet Information Server)

  2. Weblogic server

  3. Glass fish server

  4. All of the above

  5. None of the above


Correct Option: A
Explanation:

It is web server.

Which of the following is not true about the software testing?

  1. Software testing is used to check the validity of the software.

  2. To check that whether the software meets the requirement during the design and development or not.

  3. Whether the software meets the requirement of the stakeholder.

  4. To check whether the software is costly or not.

  5. None of the above


Correct Option: D
Explanation:

It is not a true statement about software testing.

What is system testing in software engineering?

  1. It ensures that the integrated software meet the specified requirements.

  2. It is used to test the various components or interfaces of the software.

  3. It is used to test the specific module of the software.

  4. It is used to deliver the software for the user acceptance.

  5. None of the above


Correct Option: A
Explanation:

This is a true statement about system testing of the software. In this step, we use the whole system or software to test.

Which of the following is the final step of the Software development Life Cycle (SDLC)?

  1. Implementation

  2. Testing

  3. Design

  4. Analysis

  5. None of the above


Correct Option: A
Explanation:

Implementation is the final step of the SDLC model. This is the step is used to perform on several system to run the software before it got launched.

Which of the following command comes under the data manipulation language (DML) in database?

  1. Create

  2. Alter

  3. Delete

  4. Drop

  5. Grant


Correct Option: C
Explanation:

It is a DML command, which is used to delete the records form the table according to the condition. This command is used to manage the data within the table.

Which of the following class(es) belong to java.lang package?

  1. String

  2. Thread

  3. Throwable

  4. Math

  5. All of the above


Correct Option: E
Explanation:

All of the above belong to java.lang package.

Which of the following is called white box testing?

  1. It is the testing used without the knowledge of functional details of the system.

  2. It is the testing used to perform based on the structural pattern of the system.

  3. It is the testing used to perform on the individual modules of the software.

  4. It is the testing used to specify the user's specific requirement.

  5. None of the above


Correct Option: B
Explanation:

This is called the whitebox testing.

What is the following determines the robustness of the java programming language?

  1. It determines that the java is error free language as it is strictly typed.

  2. It determines the multithreading support.

  3. It determines that java bytecode can run on any platform.

  4. It determines that java is widely distributed over internet.

  5. None of the above


Correct Option: A
Explanation:

Yes, it is the feature of java robustness.

Which of the following is not a feature of object oriented programming languages?

  1. There is mainly focus on the object.

  2. Code reusability.

  3. Data binding.

  4. Top down programming approach.

  5. None of the above


Correct Option: D
Explanation:

It is the feature of procedural programming languages and object oriented languages follow the bottom-up approach.

Which of the following is/are the true statement?

  1. A constructor has the same name as a class name.

  2. Destructors are used to release the resources.

  3. A constructor can be private in C++.

  4. All of the above.

  5. None of the above


Correct Option: D
Explanation:

This is the correct choice.

Which of the following is the example of linear data structure?

  1. Tree

  2. Graph

  3. Linked list

  4. All of the above

  5. None of the above


Correct Option: C
Explanation:

It is a linear data structure. A linear data structures elements are arranged in a list.

Which of the following is/are the true statements?

  1. C++ supports null pointers.

  2. int *ptr[abs] is the example of array of pointer to an integer.

  3. In C++, we can pass pointer to a function.

  4. All of the above.

  5. Only (1) and (3) are true.


Correct Option: D
Explanation:

Yes, all of the above three are the true statements.

Which of the following is/are the use of database trigger in database?

  1. To replicate the data.

  2. To enforce business rules.

  3. To execute business rules

  4. All of the above.

  5. Only (1) and (2).


Correct Option: D
Explanation:

This is the correct choice. All the three statements are true.

Ethernet cabling is an example of?

  1. Bus topology

  2. Ring topology

  3. Mesh topology

  4. Star topology

  5. None of the above


Correct Option: A
Explanation:

Yes, Ethernet cabling is the example of bus topology. Ethernet uses different types of cabling according to the point to point network communication like bus topology.

Which of the following is the disadvantage of the bus topology in networking?

  1. In bus topology, there is no need to require the large cable length.

  2. It is easy to install.

  3. There is a point-to-point communication among the networking devices in the bus topology.

  4. It minimize the number of cable needed to connect the network.

  5. None of the above


Correct Option: E
Explanation:

Yes, all of the above are the advantages of bus topology.

Which of the following is not true?

  1. Jquery uses the javascript library.

  2. Jquery supports ajax.

  3. By including jquery library files in to our project, it takes additional space on the server.

  4. Google map is the example of ajax.

  5. None of the above


Correct Option: E
Explanation:

Yes, all of the above are the true statements.

Which of the property of the database transaction ensures the persistency of the database?

  1. Isolation

  2. Durability

  3. Atomicity

  4. Consistency

  5. None of the above


Correct Option: B
Explanation:

This property of the database transaction is used to specify that once the transaction is complete then it will persist in the system despite the system failure or other problem.

Which of the following is not a String function in C# language?

  1. IndexOf()

  2. ToLower()

  3. Contains()

  4. Trim()

  5. None of the above


Correct Option: E
Explanation:

All of the above are the String functions in C#.

Which of the following is/are the client side programming languages?

  1. ASP.Net

  2. JavaScript

  3. PHP

  4. Both (2) and (3)

  5. None of the above


Correct Option: B
Explanation:

It is a client side programming language.

Which of the following is an example of application software?

  1. Media player

  2. Accounting software

  3. Operating system

  4. Both (1) and (2)

  5. None of the above


Correct Option: D
Explanation:

Yes, both are true.

Which of the following is/are the true statements(s)?

  1. Ajax uses javascript to communicate with the server.

  2. In ajax, we need not to wait the response of the server to load a particular part of the page.

  3. There is no server side request to handle in javascript.

  4. All of the above.

  5. Only (1) and (2).


Correct Option: D
Explanation:

Yes, all of the above are the true statements.

- Hide questions