- Which of the following is the correct file extension for a VB.NET source file?
A) .vb
B) .vbn
C) .bas
D) .net
Answer: A - Which keyword is used to declare a variable in VB.NET?
A) Var
B) Dim
C) Let
D) Declare
Answer: B - Which data type is used to store decimal values with high precision?
A) Double
B) Float
C) Decimal
D) Single
Answer: C - What is the default value of a Boolean variable?
A) True
B) False
C) Null
D) 0
Answer: B - Which operator is used for string concatenation?
A) +
B) &
C) *
D) ||
Answer: B - Which keyword is used to define a method?
A) Method
B) Function
C) Sub
D) Define
Answer: C - Which keyword returns a value from a function?
A) Return
B) Exit
C) End
D) Stop
Answer: A - Which loop executes a block of code a fixed number of times?
A) While
B) Do While
C) For
D) Do Until
Answer: C - Which statement is used for decision making?
A) If…Then
B) For
C) Loop
D) While
Answer: A - Which control is used to accept user input?
A) Label
B) Button
C) TextBox
D) Panel
Answer: C - Which event is triggered when a form loads?
A) Click
B) Load
C) Start
D) Initialize
Answer: B - Which keyword is used to declare a constant?
A) Dim
B) Static
C) Const
D) Fixed
Answer: C - What is the purpose of Option Explicit?
A) Disable variables
B) Force variable declaration
C) Enable loops
D) Optimize code
Answer: B - Which keyword is used for inheritance?
A) Implements
B) Inherits
C) Extends
D) Uses
Answer: B - Which type is used for storing text?
A) Char
B) String
C) Text
D) Varchar
Answer: B - Which keyword is used to create an object?
A) New
B) Create
C) Instance
D) Object
Answer: A - Which control displays static text?
A) TextBox
B) Label
C) Button
D) ListBox
Answer: B - Which property is used to change text of a control?
A) Value
B) Text
C) Caption
D) Content
Answer: B - Which method displays a message box?
A) Show()
B) MessageBox()
C) MsgBox()
D) Alert()
Answer: C - Which data type is used for whole numbers?
A) Integer
B) Float
C) Double
D) Decimal
Answer: A - Which keyword is used for looping until condition is false?
A) Do While
B) Do Until
C) While
D) Loop Until
Answer: B - Which keyword is used to terminate a program?
A) End
B) Stop
C) Exit
D) Close
Answer: A - Which structure handles multiple conditions?
A) If
B) Switch
C) Select Case
D) Loop
Answer: C - Which keyword is used to define class?
A) Class
B) Object
C) Struct
D) Module
Answer: A - Which keyword is used to declare array?
A) Array
B) Dim
C) List
D) Var
Answer: B - Which function returns length of string?
A) Size()
B) Len()
C) Count()
D) Length()
Answer: B - Which symbol denotes comments in VB.NET?
A) //
B) #
C) ‘
D) /* */
Answer: C - Which keyword exits a procedure?
A) End
B) Exit
C) Stop
D) Return
Answer: B - Which property sets background color?
A) Color
B) BackColor
C) BgColor
D) FillColor
Answer: B - Which property defines control size?
A) Size
B) Width
C) Height
D) Bounds
Answer: A - Which event occurs on button click?
A) Press
B) Click
C) Select
D) Enter
Answer: B - Which keyword defines module?
A) Class
B) Module
C) Structure
D) Package
Answer: B - Which type stores single character?
A) Char
B) String
C) Byte
D) Text
Answer: A - Which operator is used for comparison?
A) =
B) ==
C) Equals
D) Compare
Answer: A - Which property sets control visibility?
A) Show
B) Visible
C) Display
D) Enable
Answer: B - Which method clears TextBox?
A) Clear()
B) Reset()
C) Empty()
D) Remove()
Answer: A - Which keyword defines structure?
A) Struct
B) Structure
C) Record
D) Type
Answer: B - Which loop checks condition first?
A) Do While
B) Do Until
C) For
D) Loop
Answer: A - Which keyword is used for logical AND?
A) &&
B) And
C) &
D) &&&
Answer: B - Which control shows dropdown list?
A) ListBox
B) ComboBox
C) TextBox
D) Panel
Answer: B - Which method adds item to ComboBox?
A) Add()
B) Insert()
C) Append()
D) Include()
Answer: A - Which namespace is used for console operations?
A) System.Console
B) Console.IO
C) System.IO
D) System.Text
Answer: A - Which method outputs text to console?
A) Print()
B) Write()
C) Show()
D) Output()
Answer: B - Which keyword is used for exception handling?
A) Try
B) Catch
C) Finally
D) All of these
Answer: D - Which keyword handles exception?
A) Try
B) Catch
C) Finally
D) Throw
Answer: B - Which keyword throws exception?
A) Throw
B) Catch
C) Try
D) Raise
Answer: A - Which operator is used for NOT?
A) !
B) Not
C) ~
D) Neg
Answer: B - Which property sets control font?
A) Font
B) Style
C) TextFont
D) Format
Answer: A - Which keyword defines interface implementation?
A) Interface
B) Implements
C) Inherits
D) Extend
Answer: B - Which keyword ends a block?
A) End
B) Close
C) Stop
D) Finish
Answer: A
Pages: 1 2