Home
MCQS
VB.Net MCQ Quiz Hub
VB.Net Mcq Question Set 10
Choose a topic to test your knowledge and improve your VB.Net skills
1. If the elements in two arrays are related by their subscripts, the arrays are called as ______arrays.
associated
coupled
matching
parallel
2. The strStates and strCapitals arrays are parallel arrays. If Illinois is stored in the second element in the strStates array, where is its capital (Springfield) stored?
strCapitals(1)
strCapitals(2)
strCapitals(0)
strCapitals(3)
3. A __________ resembles a table.
One-dimensional array
Two-dimensional array
Three-dimensional array
N-dimensional array
4. We can determine number of elements in two-dimensional array by ______
Multiplying number of rows and number of columns
Adding number of rows and number of columns
Multiplying number of rows and number of rows
Adding number of columns and number of columns
5. The _____________ in a two-dimensional array specifies the elements row and column position.
Superscript
Subscript
Row number
Column number
6. Each element in a two-dimensional array is identified by a unique combination of _______
One subscript
Two subscripts
Three subscripts
Zero subscript
7. The subscripts are _________ than the row and column in which the element is located.
One number less
One number more
Two number less
Two number more
8. To traverse two dimensional array you require ________________ loops.
One
Two
Three
Zero
9. Which of the following declares a two-dimensional array that has three rows and four columns?
Dim decNums(2, 3) As Decimal
Dim decNums(3, 4) As Decimal
Dim decNums(3, 2) As Decimal
Dim decNums(4, 3) As Decimal
10. The intSales array is declared as follows: Dim intSales(,) As Integer = {{1000, 1200, 900, 500, 2000}, {350, 600, 700, 800, 100}}. The intSales(1, 3) = intSales(1, 3) + 10 statement will ______
replace the 900 amount with 910
replace the 500 amount with 510
replace the 700 amount with 710
replace the 800 amount with 810
11. Variables declared using a structure is known as __________
Variables
Auto variables
Structure variables
Constant variables
12. You refer to the structure variable by its ______
Name
Data type
Dot operator
Member name
13. You refer to the member variable by preceding its name with the name of the _______ in which it is defined.
Variable
Auto variable
Structure variable
Constant variables
14. Programmers use _____ when they need to pass a group of related variables.
Structure variable
Variable
Auto variable
Constant variable
15. Programmers use ________ when they need to store related items in an array, even though the members have different data type.
Structure variable
Variable
Auto variable
Constant variable
16. Which statement is used to create a user-defined data type?
Declare
Define
Struct
UserType
17. A structure variable named address contains a member variable named strStreet. Which of the following statements assigns the string “Maple” to the member variable?
address&strStreet = “Maple”
address.strStreet = “Maple”
strStreet.address = “Maple”
strStreet&address=”Maple”
18. An array is declared using the statement Dim inventory(4) As Product. Which of the following statements assigns the number 100 to the intQuantity member variable contained in the last array element?
inventory.intQuantity(4) = 100
inventory(4).Product.intQuantity = 100
inventory(3).intQuantity = 100
inventory(4).intQuantity=100
19. An application uses a structure named Employee. Which of the following statements declares a five-element array of Employee structure variables?
Dim workers(4) As Employee
Dim workers(5) As Employee
Dim workers As Employee(4)
Dim workers As Employee(5)
20. In most applications, the code to define a user-defined data type is entered in the form’s.
Declarations section
Definition section
Load event procedure
User-defined section
21. Reading data from a file is referred to as _______
Reading a file
Writing a file
Appending a file
Executing a file
22. Writing data to a file is referred to as ________
Reading a file
Writing a file
Appending a file
Executing a file
23. The file to which data is write is referred to as _______
Input file
Output file
Random access file
Sequential file
24. Files that are read by computer are called as ______
Input file
Output file
Random access file
Sequential file
25. Files that read and write in consecutive order are known as _____
Input files
Output files
Sequential access file
Random access file
26. Files that contain lines of text are known as _______
Binary files
Text files
Character files
Array files
27. Programmers refer to the sequence of character as _________
Stream of tokens
Stream of characters
Stream of bits
Stream of bytes
28. In Visual Basic, you use _________ to write a stream of characters.
StreamWriter object
StreamWriter class
StreamReader object
StreamReader class
29. __________ is used to open a sequential access file for output.
CreateText method
AppendText method
OpenText method
WriteText method
30. ________ is used to open the sequential file access for append.
CreateText method
AppendText method
OpenText method
WriteText method
31. ______ is a programming language that allows the programmer to use objects to accomplish his goals.
Structured programming language
Object-oriented programming language
Top-down programming language
Bottom-up programming language
32. Each object used in a object oriented programming is created from ______
Class
Object
Instance
users
33. An object is the ________ of the class.
Instance
Class
Object
users
34. A _________ variable is the instance of the String class.
Button
String
Character
Array
35. _____ are the characteristics that describe the object.
Classes
Attributes
Objects
Instances
36. _____ are operations that the object is capable of performing.
Methods
Events
Instances
Attributes
37. ______ are the actions to which an object can respond.
Methods
Events
Instances
Attributes
38. An object’s _______________ include methods and events.
Attribute
Behavior
Instance
Methods
39. A class ______________ all the behavior and attributes of an object.
Encapsulates
Abstracts
Inherits
Instantiate
40. Objects are ____________ from a class.
Instantiated
Evaluated
Printed
Outdated
41. Class is defined using _______
Class statement
Object statement
Access specifier statement
Instance statement
42. The convention is to use _____ case for classname.
Upper
Lower
Pascal
Mixed
43. Objects are represented by _____________ variables and ______________ properties.
Private, Public
Public, Private
Protected, Public
Protected, Private
44. The behavior are represented by _______
Methods
Attributes
Values
Numbers
45. After defining a class you can instantiate one or more _____
Objects
Classes
Attributes
Methods
46. The computer creates the object when it processes the statement containing ____________ keyword.
Class
Object
New
Private
47. The class statement groups _______________ item in one unit.
Related
Different
Same access specifier items
Different access specifier items
48. The name of the class file ends with ______
.cla
.class
.cla
.vb
49. A constructor is a ______
A function procedure
A sub procedure
Either a function procedure or a sub procedure
A property procedure
50. Which of the following statements is false?
A class can have only one constructor
A class can have multiple constructors
An object created from a class is referred to as instance of the class
An instance of a class is considered an object
Submit