Visual Basic Online Test

50 Questions

Settings
Please wait...
Visual Basic Online Test

VB. Net Online Test


Questions and Answers
  • 1. 
    Which keyword refers the parent of the current object
    • A. 

      Me

    • B. 

      Super

    • C. 

      Mybase

    • D. 

      This

  • 2. 
    • A. 

      It makes a method Overridable

    • B. 

      It makes a method not inheritable

    • C. 

      It replaces all the implementation from high in the inheritance chain

    • D. 

      None

  • 3. 
    How do you achieve interface implementation in VB.NET?
    • A. 

      Implements

    • B. 

      Uses

    • C. 

      Imports

    • D. 

      Overrides

  • 4. 
    How does VB.NET instantiates the .NET object
    • A. 

      Using NEW keyword

    • B. 

      Using CREATEOBJECT keyword

    • C. 

      Using GETOBJECT keyword

    • D. 

      Both A & B

  • 5. 
    Web.Config file is of the type
    • A. 

      .vb

    • B. 

      XML

    • C. 

      Resource

    • D. 

      Aspx

  • 6. 
    How to determine if a variable has not been initialized in VB.NET?
    • A. 

      ISNull( )

    • B. 

      IsEmpty( )

    • C. 

      IsDdNull( )

    • D. 

      None

  • 7. 
    Which part of the .NET Framework provides Context for managed code?
    • A. 

      CLR

    • B. 

      .NET Context Manager

    • C. 

      CTS

    • D. 

      None

  • 8. 
    How are the parameters referenced by default in VB.NET?
    • A. 

      By Object

    • B. 

      By Val

    • C. 

      By Ref

    • D. 

      None

  • 9. 
    • A. 

      Option Strict On

    • B. 

      Option Strict=1

    • C. 

      Options Strict True

    • D. 

      Option Strict off

  • 10. 
    Which are the exceptions that VB.Net supports ,C# & other languages doesn’t support ?
    • A. 

      When Clause

    • B. 

      Exit Try statement

    • C. 

      Both A & B

    • D. 

      None

  • 11. 
    VbOk,VbCancel,VbAbort are all the enumerated members of
    • A. 

      MsgboxStyle Enumeration

    • B. 

      MsgboxResult Enumeration

    • C. 

      CompareMethod Enumeration

    • D. 

      None

  • 12. 
    Which of the following are the valid method of command object
    • A. 

      ExecuteNonQuery & ExecuteScalar

    • B. 

      ExecuteQuery & ExecuteScalar

    • C. 

      ExecuteParameter

    • D. 

      None

  • 13. 
    The Visual Basic Compiler is
    • A. 

      Vbcompiler.exe

    • B. 

      Vb.exe

    • C. 

      Vbc.exe

    • D. 

      None

  • 14. 
    Which statement shows Boxing?
    • A. 

      Dim O as object=I ( as i an integer)

    • B. 

      Dim I as integer=O

    • C. 

      Both

    • D. 

      None

  • 15. 
    What is the maximum no of dimension that an array can have in VB.NET ?
    • A. 

      3

    • B. 

      5

    • C. 

      32

    • D. 

      Unlimited

  • 16. 
    Which class is used to run the EXE application file in VB.NET
    • A. 

      Process

    • B. 

      Application

    • C. 

      Exe

    • D. 

      Execute

  • 17. 
    How do you join strings in VB.NET
    • A. 

      +

    • B. 

      &

    • C. 

      Both A & B

    • D. 

      None

  • 18. 
    To find out the role of the logged in user, you’ll use
    • A. 

      User.IsInRole(“Administrators”)

    • B. 

      User.Role(“Administrators”)

    • C. 

      UserRole(“Administrators”)

    • D. 

      None

  • 19. 
    Classes from which namespace will have to be used to read or write to a file?
    • A. 

      System.IO

    • B. 

      System.FileObjects

    • C. 

      System.FileSystem

    • D. 

      None

  • 20. 
    In VB.NET default value for Boolean variable?
    • A. 

      TRUE

    • B. 

      FALSE

    • C. 

      Nothing

    • D. 

      Null

  • 21. 
    Which SQL statement is used to delete data from a database ?
    • A. 

      Delete

    • B. 

      Remove

    • C. 

      Collapse

    • D. 

      None of the above

  • 22. 
    Which SQL statement is used to update data in a database ?
    • A. 

      Save

    • B. 

      Save As

    • C. 

      Modify

    • D. 

      Update

  • 23. 
    Which SQL statement is used to extract data from a database ?
    • A. 

      Open

    • B. 

      Extract

    • C. 

      Get

    • D. 

      Select

  • 24. 
    System databases stores server specific configuration information, including authorized users, databases, system configuration settings and remote servers ?
    • A. 

      Model db

    • B. 

      Master db

    • C. 

      Resource db

    • D. 

      Msdb db

  • 25. 
    A _____ column cannot contain NULL values since it is used to uniquely identify rows in a table.
    • A. 

      Primary key

    • B. 

      Foreign key

    • C. 

      Composite key

    • D. 

      Candidate key

  • 26. 
    Which of the following type of Integrity ensures that each row can be uniquely identified by an attribute called the primary ?
    • A. 

      User Defined Integrity

    • B. 

      Domain Integrity

    • C. 

      Referential Integrity

    • D. 

      Entity Integrity

  • 27. 
    Which of the following is a comparison operator?
    • A. 

      +

    • B. 

      <

    • C. 

      And

    • D. 

      Between and not between

  • 28. 
    Why use Stored Procedures ?
    • A. 

      Stored procedures allow a lot more flexibility offering capabilities such as conditional logic

    • B. 

      Stored procedures are stored within the DBMS, bandwidth and execution time are reduced

    • C. 

      Client developers are abstracted from complex designs

    • D. 

      All of the above

  • 29. 
    Which command is used for saving the transaction ?
    • A. 

      Like

    • B. 

      Set

    • C. 

      Join

    • D. 

      Commit

  • 30. 
    • A. 

      680

    • B. 

      680.9

    • C. 

      689.9

    • D. 

      690

  • 31. 
    What is the symbol for creating temporary Table in SQL Server.
    • A. 

      !

    • B. 

      @

    • C. 

      #

    • D. 

      $

  • 32. 
    What is the maximum size of a row ?
    • A. 

      8030 bytes

    • B. 

      7080 bytes

    • C. 

      8060 bytes

    • D. 

      8000 bytes

  • 33. 
    Consider the emp table having columns empno, ename Which of eth following SQL query fetches empno that occur more than twice in the emp table
    • A. 

      Select count(*) from emp group by empno having count(*) >2;

    • B. 

      Select empno, count(*) from emp having count(*) >2;

    • C. 

      Select empno, count(*) from emp where count(*) >2;

    • D. 

      Select empno, count(*) from emp group by empno having count(*) >2;

  • 34. 
    A query within a query where the inner query is evaluated for each row in the outer query is called
    • A. 

      Join

    • B. 

      View

    • C. 

      Correlated subquery

    • D. 

      None of the above

  • 35. 
    What's the maximum number of parameters can a SQL Server 2000 stored procedure have
    • A. 

      128

    • B. 

      256

    • C. 

      512

    • D. 

      1024

  • 36. 
    Which is faster?
    • A. 

      Union

    • B. 

      Union All

    • C. 

      Both are of equal efficiency

    • D. 

      Can't be determined

  • 37. 
    Expansion of SQL?
    • A. 

      Structured Query Language

    • B. 

      Simple Query Language

    • C. 

      Small Query Language

    • D. 

      None

  • 38. 
    Which of the following aggregate functions returns a row count as an integer?
    • A. 

      AVG

    • B. 

      COUNT_BIG

    • C. 

      STDEV

    • D. 

      COUNT

  • 39. 
    Which types of joins let you retrieve nonmatching data?
    • A. 

      Full outer join

    • B. 

      Inner join

    • C. 

      Left outer join

    • D. 

      Both A & C

  • 40. 
    What is a Index?
    • A. 

      To reset the identity

    • B. 

      To execute the Quesry faster

    • C. 

      To Delete the Identity

    • D. 

      Both A & C

  • 41. 
    What is the output : dim i,j as integer for i=1 to 10       for j=1 to 5         msgbox i      next j next i
    • A. 

      Messagebox prompts i value 50 times

    • B. 

      Messagebox prompts i value 15 times

    • C. 

      Messagebox prompts i value 10 times

    • D. 

      None

  • 42. 
    What does msgbox shows for s value: dim s as string s=mid(now,3,2) msgbox s
    • A. 

      Current date

    • B. 

      Current month

    • C. 

      Error

    • D. 

      None

  • 43. 
    How to add the item to combo box if it names cmb
    • A. 

      Cmb.Items "name"

    • B. 

      Cmb.Items.Add ("name")

    • C. 

      Cmb.Add ("name")

    • D. 

      None

  • 44. 
    How do you center a form?
    • A. 

      Size

    • B. 

      Windowstate

    • C. 

      Startposition

    • D. 

      Padding

  • 45. 
    Can I send keystrokes to a DOS application from VB.Net?
    • A. 

      True

    • B. 

      False

    • C. 

      Not possible

    • D. 

      None

  • 46. 
    How To Get The Server Date & Time and Displayed in a Label
    • A. 

      Now()

    • B. 

      Format(Now(),"DD-MM-YYYY")

    • C. 

      Select * from getdate

    • D. 

      Select getdate()

  • 47. 
    An Employee Table Having Data in the sequence  Employee No [numeric],  Employee Name [varchar(100)], Emp Date of Birth [date&time], Designation [varchar(50)], Department [varchar(50)] to Retrive data by using query select * from employee  displayed in textbox1, textbox2, textbox3, textbox4, textbox5Output is like
    • A. 

      123 KISHORE 37:02.4 Officer Computers

    • B. 

      123 KISHORE 37:02.4 Officer Computers

    • C. 

      123 KISHORE 9/19/2010 Officer Computers

    • D. 

      None of these

  • 48. 
    An Employee Table Having Data in the sequence  Employee No [numeric], Employee Name [varchar(100)],Emp Date of Birth [date&time],Designation [varchar(50)],Department [varchar(50)]to Insert data by using  Query displayed in textbox1 = 123textbox2 = MURTHYtextbox3 = 12/12/1980textbox4 = Engineertextbox5 = Data Center Which Query is Used
    • A. 

      Insert into employee "123","MURTHY","12/12/1980","Engineer","Data Center"

    • B. 

      Insert into employee Employee No="123",Employee Name="MURTHY",Emp Date of Birth="12/12/1980",Designation="Engineer",Department="Data Center"

    • C. 

      Insert into employee " & val(textbox1) & ", '" & trim(textbox2) & "','" & textbox3 & "','" & trim(textbox4) & "','" & trim(textbox5) & "'

    • D. 

      Insert into employee '" & trim(textbox1) & "', '" & val(textbox2) & "','" & val(textbox3) & "','" & val(textbox4) & "','" & val(textbox5) & "'

  • 49. 
    How to concatenate two TextBoxes
    • A. 

      Textbox1.text + textbox2.text

    • B. 

      Textbox1.text & textbox2.text

    • C. 

      Val(textbox1.text) + val(textbox2.text)

    • D. 

      A & b

  • 50. 
    Private Sub Display_Click() Dim DA As String DA="RAMANUJA RAO  P#ASM-1#Asthana Mandapam#123" astrsplititems = Split(DA, "#")For intX = 0 To UBound(astrsplititems)List1.Items.Add "Item(" & intX & "): " & astrsplititems(intX)NextClose #1End SubClick the Display Button Output is
    • A. 

      Item(0): RAMANUJA RAO P item(1): ASM-1 item(2): Asthana Mandapam item(3): 123

    • B. 

      RAMANUJA RAO P ASM-1 Asthana Mandapam 123

    • C. 

      Item(0): RAMANUJA RAO P# item(1): ASM-1# item(2): Asthana Mandapam# item(3): 123

    • D. 

      Item(0): RAMANUJA RAO P item(1): #ASM-1 item(2): #Asthana Mandapam item(3): #123