• No results found

vb.net mock test

N/A
N/A
Protected

Academic year: 2021

Share "vb.net mock test"

Copied!
15
0
0

Loading.... (view fulltext now)

Full text

(1)

[1] Which of the following applications can be developed in VB.NET? Component Library

Mobile Applications Distributed Applications All of the above

[2] .NET supports which of the following features? Cross language inheritance

Cross language debugging Cross language Exceptions All of the above

[3] What are the two main components of the .NET Framework? The .NET Framework Class Library and Common Type System. The Common Language Runtime and Common Type System.

The Common Language Runtime and the .NET Framework Class Library. The Common Language Runtime and the Intermediate Language code.

[4] The code which is processor independent code is Unmanaged code

Intemadiate Language code Native code

(2)

Managed code

[5] Unmanaged code is

The code run by the Common Language Runtime (CLR)

The native machine code that runs without the Common Language Runtime's help The code run by the OS

None of the above

[6] Which of the following features of common language runtime is not correct?

Cross-language integration, especially cross-language inheritance.

Garbage collection, which manages object lifetime so that reference counting is unnecessary.

The ability to compile once and run on any CPU and operating system that supports the runtime.

None of the above.

[7] Managed code consists of Assembly language instructions

Common Intermediate Language instructions Microsoft Intermediate Language instructions None of the above

(3)

[8] In .NET the term FCL stands for Framework Class Library

Framework Common Language Framework Class Language Framework Common Library

[9] Which of the following is used by CLR to know which files belong to an assembly?

Manifest

Common Intermediate Language Framework Class Library

Compiled native code

[10] Which of the following rule that is laid down by CLS is not correct? Global variables and methods are not interoperable.

If two variables are to be considered distinct, they must differ by more than just their case.

Single type and name should not be used for a method and a variable. All dimensions of an array must have a zero upper bound.

[11] Which compiler compiles the IL code to native code? Common Language Runtime compiler

(4)

Intemediate Language compiler Just-In-Time compiler

None of the above

[12] All classes in the .NET Framework Class Library are organized in different Classes

Namespaces Structures Modules

[13] In .NET the term CTS stands for Class Type System

Common Type System Common Type Software None of the above

[14] Which of the following statement is not correct about managed module? Every CLR-compliant compiler must produce metadata.

Every managed-module contains metadata describing the module's contents. Metadata is optional.

(5)

[15] The code that targets the runtime is known as Unmanaged code

Managed code Native code

Microsoft Intermediate Language code

[16] Which of the following does not belong to a .NET Framework class library? Classes

Structs Metadata Interfaces

[17] Which of the following statement is not correct? Choice a

The CLR of the .NET Framework runs on operating system. Choice b

The unmanaged applications run under the control of CLR and use the .NET Base Class Library and custom class library.

Choice c

On the server-side Internet Information Services run on top of OS. Choice d

(6)

ASP.NET runtime internally uses CLR and adds its own features specific to processing HTTP requests.

[18] Which of the following statement is correct? Choice a

CLR handles object creation and destruction and hence relieves programmer from destroying the objects explicitly.

Choice b

CLR handles the runtime errors and informs the concerned application about them.

Choice c

CLR extends the Windows runtime concept of process by providing application domains.

Choice d

All of the above

[19] Managed applications are Choice a

The applications whose every action is subject to approval by Common Language Runtime.

Choice b

The applications whose execution is controlled by OS. Choice c

(7)

The applications whose data management is done by the programmer. Choice d

The applications whose execution is controlled by .Net Framework Class Library.

[20] The utility used to view metadata is ILASM

ILDASM AL LDASM

[21] Which of the following statement is not correct? Choice a

When a .NET compliant language compiler compiles the source code, it emits code in intermediate language. This code is processor dependent code.

Choice b

The Just-In-Time compiler that the CLR provides compiles the Intermadiate Language code to the native code.

Choice c

The advantage of the IL is that it can be executed wherever .NET is present. Choice d

The common language runtime makes it easy to design components and applications whose objects interact across languages.

(8)

[22] The runtime that provides scalable and robust environment for the applications running under it is

Common Language Runtime Intermediate Language Runtime Common Library Runtime

Class Library Runtime

[23] Which of the following functionalities provided by the .NET Framework is correct?

Runs programs that are independent of hardware and operating systems. Supports common network protocols, and connects seamlessly with XML Web services.

Obtains optimal performance in generating native code using just-in-time (JIT) compilation.

All of the above.

[24] Consider following statement:

Dim i As Integer = 1

Which of the following code is correct that generates a multiplication table of 2? Choice a

(9)

Console.WriteLine ( 2 * i ) i = i + 1 End While Choice b While i <= 10 Console.WriteLine ( 2 * i ) i = i + 1 Choice c While i <= 10 Then Console.WriteLine ( 2 * i ) i = i + 1 End While Choice d While i <= 10 Console.WriteLine ( 2 * i ) End While

[25] Which of the following code is correct that sets a grade as pass for a student if he scores marks >= 60?

Choice a

If marks >= 60 Then grade = "Pass"

(10)

End If Choice b If marks >= 60 grade = "Pass" End If Choice c

If marks is greater than 60 grade = "Pass"

End If Choice d If marks >= 60 grade = "Pass"

[26] Consider following code snippet: Option Strict Off

Module Module1 Sub Main( ) Dim i As Integer Dim b As Boolean i = True b = -10 Console.WriteLine ( " { 0 } { 1 } ", i, b )

(11)

End Sub End Module

What would be the output of the above code? Choice a True -10 Choice b –1 True Choice c 1 False Choice d 1 True

[27] Consider following code snippet:

Module Module1 Sub Main( ) Dim x, y, z As Integer x = 11 \ 2 y = 11 / 2 z = 11 Mod 2 Console.WriteLine ( " { 0 } { 1 } { 2 }", x, y, z )

(12)

End Sub End Module

What would be the output of the above code? Choice a 1 5 6 Choice b 6 5 1 Choice c 5 6 1 Choice d 1 6 5

[28] Consider following code snippet:

Module Module1 Sub Main( )

Dim i As Integer = 5 Dim j, res As Integer res = fun ( i, j )

Console.WriteLine ( j & " " & res ) End Sub

(13)

Function fun( ByVal x As Integer, ByRef y As Integer ) As Integer y = x * x

Return x * x * x End Function End Module

What would be the output of the above code? Choice a 5 125 Choice b 125 125 Choice c 25 125 Choice d

None of the above

[29] Consider following code snippet:

Module Module1 Sub Main( )

dim true as Boolean = False Console.WriteLine( true )

(14)

End Sub End Module

Which of the following statement is correct about the above code? Choice a

Error: 'Name true is not declared' Choice b

Error: 'Keyword is not valid as an identifier' Choice c

Error: 'Identifier is not valid as a keyword' Choice d

The code runs successfully.

[30] Consider following code snippet:

Option Strict On Module Module1 Sub Main( ) Dim b As Boolean b = 1 Console.WriteLine( b ) End Sub

(15)

End Module

Which of the following statement is correct about the above code? Choice a

Error: 'Option Strict On disallows implicit conversions from Integer to Boolean' Choice b

Error: 'Option Strict On disallows implicit conversions from Boolean to Integer' Choice c

Error: 'Name b is not declared' Choice d

References

Related documents

In liver cancer, accumulating evidence has demonstrated the existence of a small subset of cancer cells with stem cell properties (self-renewal and differentiation) and several

In two additional 18 analyses reported here, we examined whether there was an effect of the direction of the vowel 19 change on subjects’ mean A-prime (A’) scores (Grier,

I like The Lord of the Rings because it’s really exciting?. It’s longer than most films, but the actors

4 (c) shows optical micrographs of friction stir weld AA6061 at heat affected zone from the micrograph it can be observed that grains are slightly elongated. 4

This dissertation analyzes the motivations of governments, both foreign and domestic, in respond- ing to natural disasters. I address government responses to natural disasters in

To determine the goodness of the metaheuristics considered in this work, this section presents a comparison of the results from the best performing algorithm (SA) with

As variable empowerment, education, training, group participation, political affiliation, credit, income and poverty were used.. In the study it was attempted to find a

• The deadline for the part-time evening and part-time Saturday program (including advance standing students interested in these options) will be in mid-May (date to be