VB.NET Questions/Answers-VB.NET basic syntax(PartII)


VB.NET basic syntax(PartII)

1. Find any errors in the following VB.NET program:

Module Module1
     Sub Main() /* This is the main function
          Console.WriteLine('VB.NET Programming questions and answers')

     End Sub
End Module

Check answer 2. Find any errors in the following VB.NET program:

Module Module1
     Sub Main()
        Integer a
        Double b

     End Sub
End Module

Check answer 3. Find any errors in the following VB.NET program:

Module Module1
     Sub Main()
         'This is another VB.NET program with some errors
         a,b,s Integer
         d Double
         Console.WriteLine("The end of the program")
        
    End Sub
End Module

Check answer 4. What is the output from the following VB.NET program?

Module Module
     Sub Main()
        Dim a,b,sum,subtr As Integer
        a=100
        b=20
        sum=a+b
        subtr=a-b
       
        Console.WriteLine("{0}\t{1}","a+b","a-b")
        Console.WriteLine("{0}\t{1}",sum,subtr)
      End Sub
End Module


Check answer


Comments

dj gan comment

 dj gan

parames


2017-03-21



This website intents to provide free and high quality tutorials, examples, exercises and solutions, questions and answers of programming and scripting languages:
C, C++, C#, Java, VB.NET, Python, VBA,PHP & Mysql, SQL, JSP, ASP.NET,HTML, CSS, JQuery, JavaScript and other applications such as MS Excel, MS Access, and MS Word. However, we don't guarantee all things of the web are accurate. If you find any error, please report it then we will take actions to correct it as soon as possible.