vb.net mock test

September 15, 2017 | Author: Abhishek Johari | Category: Runtime System, Class (Computer Programming), Library (Computing), Compiler, Source Code
Share Embed Donate


Short Description

Mock test of vb.net...

Description

[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

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

[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

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. Every managed-module is self-describing.

[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

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

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.

[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 While i = 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 )

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 )

End Sub End Module

What would be the output of the above code? Choice a 156 Choice b 651 Choice c 561 Choice d 165

[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

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 )

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

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 The code runs successfully.

View more...

Comments

Copyright ©2017 KUPDF Inc.
SUPPORT KUPDF