0

programming languages Online Quiz - 152

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

A ‘Queue’ Collection provides ‘first-in-first-out’ functionality:

  1. True

  2. False


Correct Option: B

You can create COM Dll’s using VB.NET

  1. True

  2. False


Correct Option: B

How do you create method which can be accessed without the use of objects reference ?

  1. Using FRIEND Keyword

  2. Using STATIC Keyword

  3. Using SHARED Keyword

  4. NONE


Correct Option: C

Which of the following can be used to run other application or batch file from VB.Net

  1. System.Diagnostics.Process

  2. System.App.Run

  3. System.Diagnostics.Run

  4. System.Fileapp.Execute


Correct Option: C

What is the operator that is used to cast up & down the inheritance hierarchy?

  1. Casting

  2. DirectCast

  3. InheritenceCast

  4. LevelCasting


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 Num variable of Myclass is initialized to 10

  1. Run Time Error

  2. Compiler Error

  3. StackOverflow Exception

  4. NONE


Correct Option: B

AI Explanation

To answer this question, let's analyze the code step by step:

First, we have the definition of the Myclass class. This class has one member variable Num of type Integer and a constructor New that takes an Integer parameter i and assigns its value to the Num variable.

Next, we have the Test class, which contains the Main method. In the Main method, an instance of the Myclass class is created and assigned to the variable c. The constructor New is called with the argument 10.

Now, let's go through each option to understand why it is correct or incorrect:

Option A) Run Time Error - This option is incorrect. There are no runtime errors in the given code. The code will execute without any exceptions.

Option B) Compiler Error - This option is correct. The code will not compile due to a compiler error. The issue is with the line C=New Myclass (10). In VB.NET, the New keyword is not used to create instances of classes. Instead, you can directly call the constructor like C = Myclass(10). The correct syntax for creating an instance of the Myclass class and assigning it to the variable c would be c = New Myclass(10).

Option C) StackOverflow Exception - This option is incorrect. There is no recursive or infinite looping code in the given code, so a StackOverflowException will not occur.

Option D) NONE - This option is incorrect. As explained above, the correct answer is Option B.

The correct answer is B) Compiler Error. This option is correct because the code will not compile due to a syntax error in the line C=New Myclass (10).

Which program will you use to assemble a program written in IL

  1. ilasm

  2. ildasm

  3. clr

  4. NONE


Correct Option: A

Assembly manifest contains

  1. Assembly’s Identity

  2. Assembly’s Reference List

  3. Both A & B

  4. NONE


Correct Option: C

AI Explanation

To answer this question, we need to understand what an assembly manifest is.

An assembly manifest is a text file that contains metadata about an assembly. It provides information about the assembly's version, culture, dependencies, and other relevant details. The manifest is an essential component of the assembly, as it allows the runtime to resolve and load the assembly correctly.

The assembly manifest contains two main components:

A. Assembly's Identity: This component includes information about the assembly's name, version number, public key token (if the assembly is strongly named), and culture. The assembly's identity is crucial in distinguishing it from other assemblies and ensuring that the correct version is loaded.

B. Assembly's Reference List: This component lists the dependencies that the assembly requires to function correctly. It includes references to other assemblies or external components that the assembly relies on. The reference list helps the runtime locate and load the necessary dependencies when the assembly is executed.

Therefore, the correct answer is C) Both A & B. The assembly manifest contains both the assembly's identity and its reference list.

  1. What does XML stand for?
  1. eXtra Modern Link

  2. eXtensible Markup Language

  3. Example Markup Language

  4. X-Markup Language


Correct Option: B
  1. What does DTD stand for?
  1. Direct Type Definition

  2. Document Type Definition

  3. Do The Dance

  4. Dynamic Type Definition


Correct Option: B

Comment in XML document is given by

  1. -- -->

  2. -- -- >


Correct Option: C

What is the correct syntax of the declaration which defines the XML version?

  1. None of the above


Correct Option: B

Well formed XML document means

  1. it contains a root element

  2. it contain an element

  3. it contains one or more elements

  4. must contain one or more elements and root element must contain all other elements


Correct Option: D

For XML Parser to ignore a certain section of XML Document, which syntax is correct?

  1. Text to be ignored

  2. Text to be ignored


Correct Option: A

Which of the following statements is false?

  1. XSLT is a subset of XSL

  2. XSLT uses XPath

  3. XSLT is not a W3C Recommendation

  4. XSLT is written in XML


Correct Option: C
- Hide questions