0
Alien head

programming languages Online Quiz - 126

Description: programming languages Online Quiz - 126
Number of Questions: 20
Created by:
Tags: programming languages
Attempted 0/20 Correct 0 Score 0

There is nothing like a virtual constructor of a class.

  1. True

  2. False


Correct Option: A

What happens when a pointer is deleted twice?

  1. It can abort the program

  2. It can cause a failure

  3. It can cause an error

  4. It can cause a trap


Correct Option: D

What defines a general set of operations that will be applied to various types of data?

  1. Template class

  2. Function template

  3. Class template

  4. Both a and c


Correct Option: B

Which of the following library function below by default aborts the program?

  1. Terminate()

  2. end()

  3. abort()

  4. exit()


Correct Option: A

What is the difference between overloaded functions and overridden functions?

  1. Overloading is a dynamic or run-time binding and Overriding is static or compile-time binding

  2. Redefining a function in a friend class is called function overriding while Redefining a function in a derived class is called a overloaded fucntion.

  3. Overloading is a static or compile-time binding and Overriding is dynamic or run-time binding

  4. Redefining a function in a friend class is called function overloading while Redefining a function in a derived class is called as overridden fucnion.


Correct Option: C

The default access level assigned to members of a class is ___________

  1. Public

  2. Protected

  3. Private

  4. Default


Correct Option: C

An abstract class can be instantiated.

  1. True

  2. False


Correct Option: B

Can constructors be overloaded?

  1. True

  2. False


Correct Option: A

Every class has at least one constructor function, even when none is declared.

  1. True

  2. False


Correct Option: A

Which of the following operators below allow to define the member functions of a class outside the class?

  1. ::

  2. ?

  3. :?

  4. %


Correct Option: A

Inline functions are invoked at the time of

  1. Run time

  2. Compile time

  3. Depends on how it is invoked

  4. Both b and c


Correct Option: B

In a multitiered application, which tier is the browser in?

  1. First tier.

  2. Second tier.

  3. Third tier.

  4. Fourth tier.


Correct Option: A

How are life cycle methods called?

  1. By thin clients.

  2. By calls to the database

  3. By the J2EE server.

  4. By the bean's container.


Correct Option: D

What is bean-managed persistence?

  1. When you implement entity or session bean methods to use SQL commands you provide

  2. When the bean's container handles data storage and retrieval.

  3. When the J2EE server is never shut down.

  4. When changes to database data are lost during a crash


Correct Option: A

What part of the J2EE platform handles data storage and retrieval on behalf of a container-managed entity bean?

  1. The thin client.

  2. Deployment descriptors

  3. The JAR file.

  4. The bean's container


Correct Option: D

Why is XML a good way to transfer text-based data from one program or tool to another?

  1. XML imposes important limitations on the receiving program or tool.

  2. The receiving program or tool can use the XML tagging information to determine how to best handle the incoming data

  3. XML tags offer an extra level of security.

  4. XML tags specify to the receiving program or tool exactly how to format and display the data.


Correct Option: B

Why would you design a J2EE application so user data is entered by way of a JavaServer Page and managed by an underlying JavaBeans class?

  1. To make the user interface more interesting.

  2. To simplify application deployment.

  3. To prevent malicious programs from gaining access to sensitive information on your database server.

  4. To make the application much easier to update, maintain, and manage


Correct Option: D

When do you use a session bean?

  1. When you want to be certain your application data persists between program invocations , even in the event of a crash

  2. If you need to initiate a database transaction

  3. To process transient data that can be re-created in the event of a crash.

  4. to keep people who do not know how to program , from accidentally changing important logic code.


Correct Option: C

What advantage does a entity-bean have over a session bean?

  1. Entity-bean data survives crashes.

  2. An entity-bean represents non-persistent data.

  3. It creates its own JAR file during deployment

  4. You get authentication code without having to write any.


Correct Option: A

What is a J2EE component?

  1. Special icons for creating the user interface elements for thin clients

  2. A data module saved to the component area of the database.

  3. A self-contained functional software unit that is assembled into a J2ee application and interfaces with other application components

  4. A JAR file


Correct Option: C
+ View questions