You are on page 1of 9

MEDIA VIEW COMPUTERS

PROGRAMMING EXCELLENCE THROUGH VB.NET (CMP220)

[1] 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.
[2] The code that targets the runtime is known as
Choice a Unmanaged code
Choice b Managed code
Choice c Native code
Choice d Microsoft Intermediate Language code
[3] Unmanaged code is
Choice a The code run by the Common Language Runtime (CLR)
Choice b The native machine code that runs without the Common
Language Runtime's help
Choice c The code run by the OS
Choice d None of the above
[4] 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.

[5] Which of the following applications can be developed in VB.NET?


Choice a Component Library
Choice b Mobile Applications
Choice c Distributed Applications
Choice d All of the above
[6] Managed code consists of
Choice a Assembly language instructions
Choice b Common Intermediate Language instructions
Choice c Microsoft Intermediate Language instructions
Choice d None of the above
[7] In .NET the term CTS stands for
Choice a Class Type System
Choice b Common Type System
Choice c Common Type Software
Choice d None of the above
[8] Which of the following does not belong to a .NET Framework class
library?
Choice a Classes
Choice b Structs
Choice c Metadata
Choice d Interfaces
[9] .NET supports which of the following features?
Choice a Cross language inheritance
Choice b Cross language debugging
Choice c Cross language Exceptions
Choice d All of the above
[10] Which of the following features of common language runtime is not
correct?
Choice a Cross-language integration, especially cross-language
inheritance.
Choice b Garbage collection, which manages object lifetime so that
reference counting is unnecessary.
Choice c The ability to compile once and run on any CPU and operating
system that supports the runtime.

Choice d

None of the above.

[11] What are the two main components of the .NET Framework?
Choice a The .NET Framework Class Library and Common Type
System.
Choice b The Common Language Runtime and Common Type System.
Choice c The Common Language Runtime and the .NET Framework
Class Library.
Choice d The Common Language Runtime and the Intermediate
Language code.
[12] In .NET the term FCL stands for
Choice a Framework Class Library
Choice b Framework Common Language
Choice c Framework Class Language
Choice d Framework Common Library
[13] All classes in the .NET Framework Class Library are organized in
different
Choice a Classes
Choice b Namespaces
Choice c Structures
Choice d Modules
[14] Which compiler compiles the IL code to native code?
Choice a Common Language Runtime compiler
Choice b Intemediate Language compiler
Choice c Just-In-Time compiler
Choice d None of the above
[15] 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.

[16] 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
[17] Which of the following statement is not correct about managed
module?
Choice a Every CLR-compliant compiler must produce metadata.
Choice b Every managed-module contains metadata describing the
module's contents.
Choice c Metadata is optional.
Choice d Every managed-module is self-describing.
[18] Which of the following rule that is laid down by CLS is not correct?
Choice a Global variables and methods are not interoperable.
Choice b If two variables are to be considered distinct, they must differ
by more than just their case.
Choice c Single type and name should not be used for a method and a
variable.
Choice d All dimensions of an array must have a zero upper bound.
[19] The code which is processor independent code is
Choice a Unmanaged code
Choice b Intemadiate Language code
Choice c Native code
Choice d Managed code
[20] Which of the following is used by CLR to know which files belong to
an assembly?
Choice a Manifest
Choice b Common Intermediate Language
Choice c Framework Class Library
Choice d Compiled native code
[21] The technology used to create web applications and dynamic web
sites is

Choice a
Choice b
Choice c
Choice d

C++
VC++
VB
ASP.NET

[22] The utility used to view metadata is


Choice a ILASM
Choice b ILDASM
Choice c AL
Choice d LDASM
[23] Which of the following functionalities provided by the .NET
Framework is correct?
Choice a Runs programs that are independent of hardware and operating
systems.
Choice b Supports common network protocols, and connects seamlessly
with XML Web services.
Choice c
Choice d

Obtains optimal performance in generating native code using


just-in-time (JIT) compilation.
All of the above.

[24] 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
Choice b
Choice c
Choice d

156
651
561
165

[25] 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 <= 10
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

[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
Choice b
Choice c
Choice d

True -10
1 True
1 False
1 True

[27] 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"
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"

[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
Choice b
Choice c
Choice d
29]

5 125
125 125
25 125
None of the above

Consider following code snippet:

Option Explicit Off


Module Module1
Sub Main( )
Dim i As Integer
Dim b As Boolean
x = 50
End Sub
End Module
Which of the following statement is correct about the above code?
Choice a
Choice b
Choice c
Choice d

The code runs successfully.


Error: 'Name x is not declared'
Error: 'Unreferenced local variables i, b'
Error: 'Explicit initialization is not permitted'

[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.

You might also like