0

programming languages Online Quiz - 48

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

If the Oracle Engine for its internal processing has opened a cursor they are known as _________

  1. Explicit Cursor

  2. Implicit Cursor

  3. Active Data Set

  4. None of the above


Correct Option: B

You want to create a PL/SQL block of code that calculates discounts on customer orders. This code will be invoked from several places, but only within the program unit ORDERTOTAL. What is the most appropriate location to store the code that calculates the discounts?

  1. a) A stored procedure on the server

  2. b) A block of code in a PL/SQL library.

  3. e) A local subprogram defined within the program unit ORDERTOTAL

  4. d) A block of code in the body of the program unit ORDERTOTAL


Correct Option: C

AI Explanation

To answer this question, let's go through each option to understand why it is correct or incorrect:

Option A) A stored procedure on the server - This option is incorrect because storing the code in a stored procedure on the server would make it accessible from multiple program units, not just the program unit ORDERTOTAL.

Option B) A block of code in a PL/SQL library - This option is incorrect because storing the code in a PL/SQL library would also make it accessible from multiple program units, not just the program unit ORDERTOTAL.

Option C) A local subprogram defined within the program unit ORDERTOTAL - This option is correct because defining a local subprogram within the program unit ORDERTOTAL ensures that the code is only accessible within that specific program unit. This means that the code for calculating discounts will only be invoked when the ORDERTOTAL program unit is called.

Option D) A block of code in the body of the program unit ORDERTOTAL - This option is incorrect because storing the code directly in the body of the program unit ORDERTOTAL would make it less modular and harder to maintain. It is better to define a separate local subprogram within the program unit for the specific code.

The correct answer is option C. This option is correct because defining a local subprogram within the program unit ORDERTOTAL ensures that the code is only accessible within that specific program unit.

Implicit cursors are declared for

  1. Some DML,PL/SQL statements

  2. All DML,PL/SQL statements

  3. Only PL/SQL statements

  4. None of the Above


Correct Option: C

You can create Command Line applications using VB.Net

  1. True

  2. False


Correct Option: B

What is the output of the following code in Test class Class Myclass Dim Num as Integer Private Sub New (i as integer) Num=i End sub End class Class Test Sub Main() Dim c as Myclass C=New Myclass (10) End sub End Class

  1. Num variable of Myclass is initialized to 10

  2. Run Time Error

  3. Compiler Error

  4. StackOverflow Exception


Correct Option: C

How does VB.NET instantiates the .NET object

  1. Using NEW keyword

  2. Using CREATEOBJECT keyword

  3. Using GETOBJECT keyword

  4. Both A & B


Correct Option: A

Select the keyword used to compare the object variable?

  1. And

  2. OR

  3. IS

  4. OF


Correct Option: C

Web.Config file is of the type

  1. .vb

  2. XML

  3. Resource

  4. Aspx


Correct Option: B

OPTION exists in VB.NET

  1. True

  2. False


Correct Option: B

A DataSet can hold any number of tables

  1. True

  2. False


Correct Option: B

Every .NET compliant compiler generates IL:

  1. True

  2. False


Correct Option: B

Casting from reference type to value or vice versa is called as

  1. Casting of variables

  2. Boxing/Unboxing

  3. Structure & Class conversion

  4. Stack & Heap Conversion


Correct Option: B

What is the lower bound value of array in VB.NET?

  1. 0

  2. -1

  3. 2

  4. 3


Correct Option: A

How do you preserve the contents of an array from being cleared when the array is redimensioned?

  1. Using Redim Keyword

  2. Using Preserve Keyword

  3. Using Reserve Keyword

  4. None of the above


Correct Option: B

AI Explanation

To preserve the contents of an array from being cleared when the array is redimensioned, you can use the Preserve keyword.

Option A) Using Redim Keyword - This option is incorrect. The Redim keyword is used to resize an array, but it does not preserve the existing contents of the array. It will clear the array and allocate new memory for the resized array.

Option B) Using Preserve Keyword - This option is correct. The Preserve keyword is used along with the Redim keyword to resize an array while preserving the existing contents. When you use the Preserve keyword, the current values in the array are retained, and the array is resized accordingly.

Option C) Using Reserve Keyword - This option is incorrect. The Reserve keyword is not a valid keyword in most programming languages. It is not used for preserving the contents of an array.

Option D) None of the above - This option is incorrect. The correct answer is option B, Using the Preserve keyword.

Therefore, the correct answer is B) Using Preserve Keyword. This option is correct because it allows you to resize an array while preserving its existing contents.

Which part of the .NET Framework provides Context for managed code?

  1. CLR

  2. .NET Context Manager

  3. CTS

  4. All of the above


Correct Option: A

Assembly manifest contains

  1. Assembly’s Identity

  2. Assembly’s Reference List

  3. Both A & B

  4. None of the above


Correct Option: C

Whats the output of following code Class A Public Overridable Sub F() End Sub End Class Class B Inherits A Public Overridable Sub F() End Sub End Class

  1. Runtime Error

  2. Compiler Error

  3. Compiler Throws a warning message

  4. Both A & B


Correct Option: C

What is the lower bound value of array in VB.NET?

  1. 0

  2. -1

  3. 2

  4. 3


Correct Option: A

How do you preserve the contents of an array from being cleared when the array is redimensioned?

  1. Using Redim Keyword

  2. Using Preserve Keyword

  3. Using Reserve Keyword

  4. None of the above


Correct Option: B

Which part of the .NET Framework provides Context for managed code?

  1. CLR

  2. .NET Context Manager

  3. CTS

  4. All of the above


Correct Option: A
- Hide questions