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

Solved Answers

The document contains a series of true or false statements, one-word definitions, and answers to questions related to Visual Basic programming. It explains variable declaration, operators, and the differences between looping structures like Do While...Loop and Do Until...Loop. Additionally, it provides examples for the For...Next and If...Then statements.

Uploaded by

Ravit Arya
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)
5 views2 pages

Solved Answers

The document contains a series of true or false statements, one-word definitions, and answers to questions related to Visual Basic programming. It explains variable declaration, operators, and the differences between looping structures like Do While...Loop and Do Until...Loop. Additionally, it provides examples for the For...Next and If...Then statements.

Uploaded by

Ravit Arya
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

Solved Answers

C. Write True or False:


1. True

2. True

3. True

4. True

5. False

D. Write one word for the following:


1. Variable

2. String

3. Select Case

4. If...Then

E. Answer the following questions:


1. 1. What do you understand by declaring variables? How will you declare variables in
Visual Basic?

Declaring variables means creating memory space to store values. In Visual Basic, variables
are declared using the keyword Dim.
Example: Dim age As Integer

2. 2. What are operators? Write any two different categories of operators that can be used
in Visual Basic.

Operators are symbols used to perform operations on values and variables.


Two categories:
• Arithmetic Operators
• Relational Operators

3. 3. Differentiate between Do While...Loop and Do Until...Loop.

• Do While...Loop runs as long as the condition is TRUE.


• Do Until...Loop runs as long as the condition is FALSE.

4. 4. Explain the use of For...Next statement with the help of an example.


For...Next loop is used to repeat a set of statements a fixed number of times.
Example:
For i = 1 To 5
Print i
Next

5. 5. Explain the use of If...Then statement with the help of an example.

If...Then statement is used to execute a block of code only when a condition is true.
Example:
If marks > 40 Then
Print "Pass"
End If

You might also like