[go: up one dir, main page]

0% found this document useful (0 votes)
2 views2 pages

Visual Basic

Uploaded by

mpulkit33
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views2 pages

Visual Basic

Uploaded by

mpulkit33
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Section A (compulsory)

A. Multiple Choice Question ( 1 x 10 = 10)


1. Which extension represents the project file in Visual Basic?
a) .vbp
b) .vb
c) .cls
d) .vvb
2. Which of the following is NOT a valid data type in Visual Basic?
a) Integer
b) String
c) Float
d) Boolean
3. How can you convert a string to a date in Visual Basic?
a) CDate("01/01/2025")
b) Convert.ToDateTime("01/01/2025")
c) Date.Parse("01/01/2025")
d) All of the above
4. What does the Trim() function do in Visual Basic?
a) Converts a string to uppercase
b) Removes spaces from the beginning and end of a string
c) Removes all spaces from a string
d) Replaces spaces with underscores
5. Which method is used to determine the number of elements in an array?
a) arr.Length
b) arr.Size
c) arr.Count
d) UBound(arr) - LBound(arr) + 1
6. Which component is used to add buttons, text boxes, and labels to a Windows Form?
a) Toolbox
b) Solution Explorer
c) Properties Window
d) Server Explorer
7. Which property of a button control changes its displayed text?
a) Text
b) Caption
c) Label
d) Name
8. How do you make a TextBox control read-only?
a) Set Locked = True
b) Set ReadOnly = True
c) Set Enabled = False
d) Set TextMode = Locked
9. Which control is best suited for allowing users to select a date?
a) TextBox
b) Label
c) DateTimePicker
d) CalendarControl
10. How can you manually throw an exception in Visual Basic?
a)Raise ExceptionNewException("Error!")
b) Throw New Exception("Error!")
c) Raise New Exception("Error!")
d) Error New Exception("Error!")
B. Write a short note on the following : (4 x 5 = 20 )
1. How do you declare and initialize an array in Visual Basic? Provide an example.
2. What do you understand by property window?
3. Write a note on code editor window in visual studio.
4. What is debugging? List the dialogue boxes used to set the options for debugging in visual
studio.
Section B(One Question)
1. What is IDE in visual studio? Explain briefly different elements of IDE.
Or
2. a) Explain the process of designing a Windows Form in Visual Basic.
b) Discuss the purpose of common controls like TextBox, Button, Label, ComboBox, and ListBox.

Section C
3. What do you mean by a loop? Explain the difference between the Do loop and For loop with
the help of suitable examples.
or
4. Explain
a) What are Relational Operators? Explain all the relational operators supported by visual basic
b) Discuss types of logical operators used in Visual Basic.
SECTION D
5. Define
a) Procedure and Sub procedure
b) What is Exception handling? Types of Exception
OR
6. What is Array ? How to create , declare and initialize one dimensional array?
SECTION E
7. What is String ? Explain Various properties and methods of string class with example .
Or
8. How to create a DateTime value in Visual Basic ? Explain Date time properties for getting
current date and time.

You might also like