Just need help understanding this Virtual Basic What is outp

Just need help understanding this! Virtual Basic.

What is output to the file Test.txt?

Sub Main()

Dim A As String, Text As String

A = 5

Text = “Hello”

Open “C:\\Desktop\\Test.txt” for Output As 1

Write #1, A; Text

Close #1

End Sub

Solution

\'Main module
Sub Main()
   \'Declare two string variables A, Text
   Dim A As String, Text As String
   \'Assign 5 to A
   A = 5
   \'Assign Hello to Text
   Text = “Hello”
   \'Open text file called Test.txt with fil number 1
   Open “C:\\Desktop\\Test.txt” for Output As #1
   Write A and Text to text file Test.txt
   Write #1, A; Text
   \'Close the file
   Close #1
End Sub

Test.txt
5 ; Hello

Just need help understanding this! Virtual Basic. What is output to the file Test.txt? Sub Main() Dim A As String, Text As String A = 5 Text = “Hello” Open “C:\

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site