Bc0053-Vb .Net and XML-mqp

Embed Size (px)

DESCRIPTION

model question paper

Citation preview

  • Model Question Paper

    Subject Code: BC0053

    Subject Name: VB.NET & XML

    Credits: 4 Marks: 140

    Part A (One mark questions)

    1. The .Net Framework class library consists of segments of pre-written code called

    __________ which provide major functions needed for developing.Net

    A. objects

    B. classes

    C. variables

    D. constants

    2. The _____________ namespace contains the classes used to create forms.

    A. System.Windows.Forms

    B. System.Windows.Classes

    C. System.Windows.Controls

    D. System.Windows

    3. The _______________ manages the execution of .Net programs by providing essential

    functions such as memory management, code execution, security and other services.

    A. .Net Framework class library

    B. Windows Forms classes

    C. Operating System

    D. Common Language Runtime (CLR)

    4. You should press __________ to run the application without debugging.

    A. Ctrl + F5

    B. F5

    C. F4

    D. F2

    5. VB.Net uses the ____________ operator to access the member variables and methods of a

    class.

    A. -> operator

  • B. + Operator

    C. Assignment (= ) operator

    D. .(Dot)

    6. The __________________ statement, when turned on, does not allow the use of any variable

    without proper declaration.

    A. Option

    B. Option explicit

    C. Explicit

    D. Option Strict

    7. The ___________ statement is used to perform a series of specific checks.

    A. if

    B. ifthen

    C. ifthenelse

    D. SelectCase

    8. In the ________ looping structure the loop will continue until the condition remains true.

    A. DoLoop While

    B. ForNext

    C. DoWhile

    D. For Each

    9. To access the values in an array, we use the indexing operator by passing

    _______________.

    A. a float value

    B. an integer

    C. a double

    D. array object

    10. The ____________ you select determines the initial files, assembly references, code, and

    property settings added to the project.

    A. Options

    B. names

    C. options template

    D. project template

    11. The TabIndex property is a number that represents the control's position in the tab order,

    beginning with _________.

    A. 1

  • B. 0

    C. -1

    D. 2

    12. An Object's _________ consists of a clearly defined set of properties, methods, and events.

    A. property

    B. method

    C. name

    D. interface

    13. An _________ contains information relevant to the error, exposed as properties of the

    object.

    A. Error object

    B. Exception class

    C. Exception object

    D. Error Class

    14. The __________ block contains code that runs when the Try block finishes normally, or

    when a Catch block receives control and then finishes.

    A. Try

    B. Finally

    C. throw

    D. catch

    15. The ________ statement will, under a given circumstance, break out of the Try or Catch

    block and continue at the Finally block.

    A. Exit Try

    B. Try

    C. Catch

    D. Finally

    16. To connect to an Access database we need ____________ connection object.

    A. ODBC

    B. OLE DB

    C. Activex Data

    D. SQL Driver

    17. The ___________ parameter in a Connection String object indicates the location of the

    database to be connected to.

    A. Source

  • B. Driveletter

    C. Complete Path

    D. provider details

    18. ADO.NET uses ______________ to hold all the information in the database.

    A. Data

    B. Records

    C. DataSet

    D. Data Dictionary

    19. XML is a _____________ used to define other languages.

    A. object oriented language

    B. Structured language

    C. meta-language

    D. Sublanguage

    20. XML cannot be used for ______________________ the data.

    A. displaying

    B. Storing

    C. carrying

    D. exchanging

    21. The XML documents must contain a ________________ element.

    A. Child

    B. Sibling

    C. leaf

    D. Root

    22. DTD has its own small set of constructs and __________ rules that helps us to prepare our

    markup language specifications.

    A. grammar

    B. formal

    C. syntax

    D. language

    23. A valid XML file should be created based on the tags or elements defined in the ________

    file.

    A. HTML

    B. Language

    C. Meta

  • D. DTD

    24. The ___________ occurrence specifier specifies that the element can appear for 0 or more

    times.

    A. +

    B. ?

    C. *

    D. No symbol

    25. XML Schema does not allow defining ___________.

    A. objects

    B. classes

    C. entities

    D. Interfaces

    26. A simple element is an XML element that can contain only __________.

    A. Numbers

    B. Special characters

    C. Names

    D. text

    27. XML ______________ allows content model constraints for generic data formats to be built.

    A. Schema

    B. DTD

    C. Parsing

    D. XSLT

    28. ____________ allows us to define the elements and attributes with a unique identification.

    A. Namespace

    B. Names

    C. Variables

    D. Data elements

    29. The namespace is defined by the __________ attribute in the start tag of an element.

    A. xmlns

    B. Xml

    C. XSL

    D. XSLT

  • 30. In case of ________________ we declare a name space without a prefix.

    A. Languages

    B. XML

    C. Default namespace

    D. XSLT

    31. The process of taking a file and breaking it into its components is called _________ .

    A. Lexical Analysis

    B. Segregation

    C. Parsing

    D. Bifurcation

    32. A ______________ uses both an XML file and a DTD to check that the XML adheres to the

    rules of the application.

    A. validating parser

    B. Non-validating parser

    C. stream-based parser

    D. tree-based parser

    33. The XML DOM views an XML document as a _______________.

    A. Series of nodes

    B. tree-structure

    C. Set of characters

    D. a series of numbers

    34. The ____________ is an implementation of XSL markup language.

    A. XSL

    B. XSLT (XSL Transformation Engine)

    C. Cascading Style Sheets (CSS)

    D. XSL-FO

    35. XSLT uses _________ to find information in an XML document.

    A. Xpath

    B. Ypath

    C. Path

    D. Absolute Path

    36. The element is used to build __________ .

    A. style sheets

    B. XML documents

  • C. templates

    D. HTML documents

    37. The ________keeps us from depending on obstinate dynamic link library (DLL) files.

    A. Managed Code

    B. Unmanaged code

    C. function code

    D. Program Code

    38. The _____________________can be resources used by the assembly, such as image files

    or text files that the application will use.

    A. Assemblies

    B. CLR code

    C. Static assemblies

    D. Dynamic assemblies

    39. The ______________________ is a recommendation made by the W3C to enable a

    standard way of providing access to the data contained in an XML document.

    A. Component Object Model (COM)

    B. Distributed Component Object Model (DCOM)

    C. COM+

    D. Document Object Model (DOM)

    40. A ___________ is simply another level of naming to add to your XML elements and

    attributes by specifying a namespace in front of the name.

    A. naming scheme

    B. namespace

    C. naming convention

    D. attribute naming scheme

    Part B (Two mark questions)

    41. You can use the ________________ built into visual studio to compile Visual Basic source

    code into _____________________ .

    A. Visual C#, Intermediate Language (IL)

    B. Visual C++, Microsoft Intermediate Language

    C. Visual Basic, Microsoft Intermediate Language

    D. Java, Byte code

  • 42. The ______ and _______________ operators are object reference comparison operators.

    A. Is, Not

    B. AND, Not

    C. .(Dot), Is

    D. Is, IsNot

    43. Reference data types in VB.Net are ________ and ___________.

    A. structures, enumerations

    B. objects, structures

    C. delegates, enumerations

    D. objects, delegates

    44. _____ is included in the Text property of a control to indicate the character that can be used

    to access the control using the keyboard.

    A. &

    B. *

    C. #

    D. %

    45. As exceptions occur in a sequence, you can choose to stack your exceptions for later

    reference by use of the ____________________ property of your Exception object.

    A. object.

    B. Exception

    C. InnerException

    D. Error

    46. To set a reference to System.Xml.dll __________________ from the menu bar.

    A. Click File -> Add Reference

    B. Click Tools -> Add-in Manager

    C. Click Test -> Add metadata file

    D. Click Project -> Add Reference

    47. An ____________ is distinguished from other XML data because it represents a command

    to either the XML parser or a program that would use the XML document.

    A. API

    B. Object

    C. element

    D. Application

  • 48. The syntax used to declare a DTD in an external file is ________________.

    A.

    B.

    C.

    D.

    49. XML Schema includes __________ that help us to prepare XML markup language

    specifications, alternative to DTD.

    A. Destructors

    B. Constructors

    C. Objects

    D. Elements

    50. To declare a name space for the types defined in our XML schema document, we use

    ___________ attribute of _________ tag.

    A. Namespace, schema tag

    B. , schema

    C. namespace,

    D. target Name Space,

    51. ______________ returns a list of all of the children of the current node and

    ________________ returns the last child of the current node.

    A. x.getFirstChild, x.getNextSibling

    B. x.getAttributes, x.removeChild(child)

    C. x.getLastChild , x.getFirstChild

    D. x.getChildNodes, x.getLastChild

    52. An XSL style sheet is an XML document itself, it always begins with the XML declaration

    ___________________________________________ .

    A.

    B.

    C.

    D.

    53. The _______________________ method inserts a new node before the refNode in a node

    interface method.

    A. insertBefore(newChild, refChild)

    B. insertBefore(Child, refChild)

    C. insertBefore(newChild, Child)

    D. insertBefore(newChild, ref)

  • 54. The __________ method is used to create and return a CDATA object containing the

    specified string data.

    A. createDATASection(data)

    B. createCDATASection()

    C. createCDATASection(data)

    D. CDATASection(data)

    55. XML contains ____________________ in document format; hence, it is platform

    __________.

    A. data, dependent

    B. dependent, self defined data

    C. self-defined data, dependent

    D. self-defined data; independent

    56. The number of optional features in XML is to be kept to the absolute __________; ideally,

    _____ .

    A. Maximum, zero

    B. Minimum, zero

    C. Minimum, one

    D. Maximum, one

    57. While creating an XML document in Visual Studio.Net, the environment displays two tables

    for two views: the ____________ and the _____________ of your XML document.

    A. XML document, Data view

    B. XML document, Data document

    C. XML view; Data view

    D. XML document, Data document

    58. In between the ___________ and _____________, we include the content of the element in

    XML.

    A. start-tag, end-tag

    B. start, stop

    C. begin, end

    D. begin-tag, stop-tag

    59. The elements: , , , and are examples of

    _________ elements.

    A. empty

    B. complete

    C. Null

  • D. void

    60. There are two types of data types as defined in XML Schema data types: ___________ and

    ________

    A. Primitive, derived

    B. User defined, system defined

    C. User defined, Primitive

    D. system defined, derived

    Part C (Four mark questions)

    61. Match the following:

    Part A

    1. The .Net Framework class library

    2. The Common Language Runtime (CLR)

    3. Assembly

    4. My Profile Link

    Part B

    A. Manages the execution of .Net programs by coordinating essential functions.

    B. Customizes the way the IDE's Help Feature works.

    C. Provides pre-written code in the form of classes available to all .Net languages.

    D. The disk file on which the Micorsoft Intermediate Language is stored.

    Answer Options

    a. 1B, 2A, 3D, 4C

    b. 1C, 2A, 3B, 4D

    c. 1C, 2A, 3D, 4B

    d. 1D, 2A, 3C, 4B

    62. Match the resultant values of the variables:

    Part A

    1. Dim n1 as Integer = 96/8/4

    2. Dim n2 as Integer = (96/8)/4

    3. Dim n3 as Integer = 96/(8/4)

    4. Dim n4 as integer = 100 / 400 / 200

    Part B

    A. 3

    B. 50

  • C. 48

    D. 3

    Answer Options

    a. 1B, 2A, 3D, 4C

    b. 1C, 2A, 3B, 4D

    c. 1C, 2A, 3D, 4B

    d. 1D, 2A, 3C, 4B

    63. Match the following VB.Net data types with their corresponding size in bytes:

    Part A

    1. Boolean

    2. short

    3. long

    4. Decimal

    Part B

    A. 2

    B. 12

    C. 1

    D. 8

    Answer Options

    a. 1B, 2A, 3D, 4C

    b. 1C, 2A, 3B, 4D

    c. 1C, 2A, 3D, 4B

    d. 1D, 2A, 3C, 4B

    64. Match the following:

    Part A

    1. These controls in a group are mutually exclusive.

    2. These controls operate independently in a group

    3. This property can have a value of True or False

    4. This control does not have a Text property.

    Part B

    A. Check Boxes

    B. Radio Buttons

    C. Panel Control

    D. Checked property of a radio button or a check box

  • Answer Options

    a. 1B, 2A, 3D, 4C

    b. 1C, 2A, 3B, 4D

    c. 1C, 2A, 3D, 4B

    d. 1D, 2A, 3C, 4B

    65. Match the following:

    Part A

    1. The GetBaseException method

    2. The HelpLink property

    3. Message

    4. TargetSite

    Part B

    A. gets or sets the help link for a specific Exception object.

    B. A read-only string property that holds the method that threw the exception.

    C. A string that contains a description of the error, suitable for displaying to users .

    D. This method returns the originating exception.

    Answer Options

    a. 1B, 2A, 3D, 4C

    b. 1C, 2A, 3B, 4D

    c. 1C, 2A, 3D, 4B

    d. 1D, 2A, 3C, 4B

    66. Match the following core objects of .Net framework data providers:

    Part A 1. Connection

    2. Command

    3. DataReader

    4. DataAdapter

    Part B

    A. Populates a DataSet and resolves updates with the data source.

    B. Establishes the connection to a specific data source.

    C. Reads a forward only, read-only stream of data from a data source.

    D. Executes a command against a data source.

    Answer Options

    a. 1B, 2A, 3D, 4C

  • b. 1B, 2D, 3C, 4A

    c. 1C, 2A, 3D, 4B

    d. 1D, 2A, 3C, 4B

    67. Match the following terms with their definitions of XML related technologies:

    Part A

    1. SGML

    2. XSL

    3. XSLT

    4. SAX

    Part B

    A. A combination of XML and style sheets

    B. Provides rules for transformations from one XML to another.

    C. A simple API for XML, which is a predefined application package interface.

    D. The basis for all markup languages

    Answer Options

    a. 1B, 2A, 3D, 4C

    b. 1C, 2A, 3B, 4D

    c. 1C, 2A, 3D, 4B

    d. 1D, 2A, 3B, 4C

    68. Match the following:

    Part A

    1. XML

    2. Common Type System (CTS)

    3. Assembly

    4. CLRs just-in-time (JIT) compiler

    Part B

    A. Allows all the languages to share data using the same types.

    B. Includes all the information you need about your application

    C. The default encoding language of the framework.

    D. Converts the executed program code to machine code.

    Answer Options

    a. 1B, 2A, 3D, 4C

    b. 1C, 2A, 3B, 4D

    c. 1C, 2A, 3D, 4B

  • d. 1D, 2A, 3B, 4C

    69. Match the following:

    Part A

    1.

    2.

    3.

    4. Complex Element

    Part B

    A. This is used to specify the number of characters that this type accepts.

    B. An XML element that contains other elements and/or attributes.

    C. The minInclusive element is used to define the minimum acceptable value.

    D. This element is used to specify one of the possible values that this type accepts.

    Answer Options

    a. 1B, 2A, 3D, 4C

    b. 1C, 2A, 3B, 4D

    c. 1C, 2A, 3D, 4B

    d. 1D, 2A, 3C, 4B

    70. Match the following:

    Part A

    1. Namespaces

    2. Target namespace

    3. General Namespace

    4. Default Namespace

    Part B

    A. Takes a URI (Uniform Resource Indicator) that is used to uniquely refer the types

    B. Allow defining the elements in different XSD documents and references them uniquely

    C. In this case we declare a name space without a prefix

    D. In this case we declare the name space with a prefix that can be used in the document to

    refer the types/elements

    Answer Options

    a. 1B, 2A, 3D, 4C

    b. 1C, 2A, 3B, 4D

    c. 1C, 2A, 3D, 4B

  • d. 1D, 2A, 3C, 4B

    71. Match the following:

    Part A

    1. Windows Presentation Foundation (WPF)

    2. Windows Communication Foundation (WCF)

    3. Windows Workflow (WF)

    4. ASP.NET

    Part B

    A. A completely new UI technology, based on the DirectX engine, which allows creation of

    vector-based user interfaces instead of the traditional Windows bitmapped UI.

    B. An engine for creation of workflow applications.

    C. A unified framework for machine-to-machine and process-to-process communication.

    D. Provides browser-based user interfaces with Web Forms and system-to-system interface

    over the Web with Web Services.

    Answer Options

    a. 1B, 2A, 3D, 4C

    b. 1C, 2B, 3D, 4A

    c. 1A, 2C, 3B, 4D

    d. 1D, 2A, 3C, 4B

    72. Match the following:

    Part A

    1. Special data or metadata

    2. Unmanaged code

    3. The Common Language Runtime (CLR)

    4. CLS

    Part B

    A. Code thats compiled with COM and Win32API declarations.

    B. The data within the applications store a map of where to find classes, when to load classes,

    and when to set up runtime context boundaries, generate native code, enforce security,

    determine which classes use which methods, and load classes when needed.

    C. Is a subset of CLR types defined in the Common Type System and its features are

    instrumental in the interoperability process by containing the basic types required for CLR

    operability.

    D. Manages code execution and the services that .NET provides.

  • Answer Options

    a. 1B, 2A, 3D, 4C

    b. 1C, 2B, 3D, 4A

    c. 1A, 2C, 3B, 4D

    d. 1D, 2A, 3C, 4B

    73. Match the following with respect to assemblies in .Net:

    Part A

    1. Loader Optimization

    2. Single-domain setting

    3. multidomain setting

    4. multidomain host

    Part B

    A. It is the default setting and is used most in client-side situations.

    B. In this, each domain hosts different code.

    C. In this, the code is assumed to be the same across the domain.

    D. This option in an assembly has three settings: single domain, multidomain, and multidomain

    host.

    Answer Options

    a. 1B, 2A, 3D, 4C

    b. 1C, 2B, 3D, 4A

    c. 1A, 2C, 3B, 4D

    d. 1D, 2A, 3C, 4B

    74. Identify the steps in creating XML documents using Visual Studio.Net:

    1. The VS.NET will automatically load the XML Designer and display the XML document

    template, and finally, enter the contents of your XML document.

    2. Enter a name for your XML file.

    3. Select the XML File icon in the Add New Item dialog box.

    4. From the Project menu, select Add New Item.

    Answer Options

    a. 1, 2, 3, 4

    b. 4, 3, 2, 1

    c. 1, 3, 4, 2

    d. 2, 4, 1, 3

  • 75. Match the following:

    Part A

    1. The Declaration

    2. Schema or Document Type Definition (DTD)

    3. The root element

    4. Attribute

    Part B

    A. An is always placed inside the start-tag of an element, and we specify its value using the

    name=value pair protocol.

    B. Contains the rules about the elements of the document.

    C. The standard entry is used to identify the document as an XML document conforming to the

    W3C recommendation for version 1.0.

    D. The specific element in an XML document that contains all other elements inside it.

    Answer Options

    a. 1B, 2A, 3D, 4C

    b. 1C, 2B, 3D, 4A

    c. 1A, 2C, 3B, 4D

    d. 1D, 2A, 3C, 4B

  • Answer Keys

    Part - A Part - B Part - C

    Q. No. Ans. Key Q. No. Ans. Key Q. No. Ans. Key Q. No. Ans. Key

    1 b 21 a 41 c 61 c

    2 a 22 a 42 d 62 b

    3 d 23 d 43 d 63 c

    4 a 24 c 44 a 64 a

    5 d 25 c 45 c 65 d

    6 b 26 d 46 d 66 b

    7 b 27 a 47 a 67 d

    8 a 28 a 48 b 68 b

    9 b 29 a 49 b 69 c

    10 b 30 c 50 d 70 a

    11 b 31 c 51 d 71 c

    12 d 32 a 52 b 72 a

    13 c 33 b 53 a 73 d

    14 b 34 b 54 c 74 b

    15 a 35 a 55 d 75 b

    16 b 36 c 56 b

    17 a 37 a 57 c

    18 c 38 c 58 a

    19 c 39 d 59 a

    20 b 40 b 60 a