Visual Basic Online Test

Approved & Edited by ProProfs Editorial Team
The editorial team at ProProfs Quizzes consists of a select group of subject experts, trivia writers, and quiz masters who have authored over 10,000 quizzes taken by more than 100 million users. This team includes our in-house seasoned quiz moderators and subject matter experts. Our editorial experts, spread across the world, are rigorously trained using our comprehensive guidelines to ensure that you receive the highest quality quizzes.
Learn about Our Editorial Process
| By Abi333
A
Abi333
Community Contributor
Quizzes Created: 3 | Total Attempts: 175,386
Questions: 50 | Attempts: 12,292

SettingsSettingsSettings
Visual Basic Online Test - Quiz

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

    Correct Answer
    C. Mybase
    Explanation
    The keyword "Mybase" refers to the parent of the current object. It is used in object-oriented programming to access the members of the base class from within a derived class. By using "Mybase", the derived class can inherit and utilize the properties and methods of its parent class.

    Rate this question:

  • 2. 

    What is the significance of Shadowing a method in VB.Net ?

    • 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

    Correct Answer
    C. It replaces all the implementation from high in the inheritance chain
    Explanation
    Shadowing a method in VB.Net allows a derived class to provide its own implementation for a method that is already defined in a base class. When a method is shadowed, it replaces all the implementation from higher in the inheritance chain, meaning that the derived class's implementation will be used instead of the base class's implementation. This allows for customization and flexibility in the derived class's behavior.

    Rate this question:

  • 3. 

    How do you achieve interface implementation in VB.NET?

    • A.

      Implements

    • B.

      Uses

    • C.

      Imports

    • D.

      Overrides

    Correct Answer
    A. Implements
    Explanation
    In VB.NET, interface implementation is achieved using the "Implements" keyword. This keyword is used to specify that a class is implementing a particular interface. By using the "Implements" keyword, the class is required to provide implementations for all the members defined in the interface. This allows the class to inherit the behavior and functionality defined in the interface and provides a way to achieve polymorphism in VB.NET.

    Rate this question:

  • 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

    Correct Answer
    A. Using NEW keyword
    Explanation
    VB.NET instantiates .NET objects using the NEW keyword. The NEW keyword is used to create a new instance of a class or structure in VB.NET. It allocates memory for the object and initializes its fields and properties. By using the NEW keyword, a programmer can create and initialize objects in a single line of code. This is the most common and recommended way to instantiate .NET objects in VB.NET.

    Rate this question:

  • 5. 

    Web.Config file is of the type

    • A.

      .vb

    • B.

      XML

    • C.

      Resource

    • D.

      Aspx

    Correct Answer
    B. XML
    Explanation
    The Web.Config file is a configuration file used in ASP.NET applications to store settings and configurations. It is written in XML format, which allows for easy readability and modification of the settings. The XML format is also compatible with various tools and technologies used in web development, making it the appropriate type for the Web.Config file.

    Rate this question:

  • 6. 

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

    • A.

      ISNull( )

    • B.

      IsEmpty( )

    • C.

      IsDdNull( )

    • D.

      None

    Correct Answer
    C. IsDdNull( )
    Explanation
    The correct answer is IsDdNull(). This is because in VB.NET, the IsDdNull() function is used to determine if a variable has not been initialized or if it contains a null value. The IsNull() function is used to check if a variable is null in SQL, not in VB.NET. The IsEmpty() function is used to check if a variable is empty, not if it has been initialized. Therefore, IsDdNull() is the correct option to determine if a variable has not been initialized in VB.NET.

    Rate this question:

  • 7. 

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

    • A.

      CLR

    • B.

      .NET Context Manager

    • C.

      CTS

    • D.

      None

    Correct Answer
    A. CLR
    Explanation
    The Common Language Runtime (CLR) in the .NET Framework provides the context for managed code. The CLR is responsible for managing the execution of code written in different languages, providing memory management, security, and other essential services. It ensures that managed code runs efficiently and securely by compiling it into native code, managing memory allocation and deallocation, and enforcing security policies. Therefore, the CLR is the correct answer as it is the part of the .NET Framework that provides the necessary context for managed code.

    Rate this question:

  • 8. 

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

    • A.

      By Object

    • B.

      By Val

    • C.

      By Ref

    • D.

      None

    Correct Answer
    B. By Val
    Explanation
    In VB.NET, parameters are referenced by default using the "By Val" keyword. This means that when a parameter is passed to a method, a copy of the value is made and any changes made to the parameter within the method do not affect the original value outside of the method. This is the default behavior in VB.NET unless specified otherwise using the "By Ref" keyword, which allows changes made to the parameter within the method to affect the original value outside of the method.

    Rate this question:

  • 9. 

    How do you limit implicit type conversion in VB.NET?

    • A.

      Option Strict On

    • B.

      Option Strict=1

    • C.

      Options Strict True

    • D.

      Option Strict off

    Correct Answer
    A. Option Strict On
    Explanation
    The correct answer is "Option Strict On" because it is a compiler option in VB.NET that restricts implicit type conversions. When Option Strict is turned on, the compiler enforces strict type checking and does not allow implicit type conversions, ensuring that all type conversions are explicit and intentional. This helps to catch potential errors and promotes safer programming practices.

    Rate this question:

  • 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

    Correct Answer
    C. Both A & B
    Explanation
    Both the "When Clause" and the "Exit Try statement" are exceptions that VB.Net supports, but C# and other languages do not support. The "When Clause" allows for conditional exception handling, where specific conditions can be checked before catching an exception. The "Exit Try statement" allows for early termination of a Try block, skipping any remaining code within the block.

    Rate this question:

  • 11. 

    VbOk,VbCancel,VbAbort are all the enumerated members of

    • A.

      MsgboxStyle Enumeration

    • B.

      MsgboxResult Enumeration

    • C.

      CompareMethod Enumeration

    • D.

      None

    Correct Answer
    B. MsgboxResult Enumeration
    Explanation
    The correct answer is MsgboxResult Enumeration because VbOk, VbCancel, and VbAbort are all commonly used return values for message box functions. The MsgboxResult Enumeration is used to represent the possible return values of a message box function, such as the user clicking the OK, Cancel, or Abort button.

    Rate this question:

  • 12. 

    Which of the following are the valid method of command object

    • A.

      ExecuteNonQuery & ExecuteScalar

    • B.

      ExecuteQuery & ExecuteScalar

    • C.

      ExecuteParameter

    • D.

      None

    Correct Answer
    B. ExecuteQuery & ExecuteScalar
    Explanation
    The correct answer is ExecuteQuery & ExecuteScalar. These are valid methods of the command object in programming. ExecuteQuery is used to execute a SQL query and return the results as a data reader, while ExecuteScalar is used to execute a SQL query and return a single value.

    Rate this question:

  • 13. 

    The Visual Basic Compiler is

    • A.

      Vbcompiler.exe

    • B.

      Vb.exe

    • C.

      Vbc.exe

    • D.

      None

    Correct Answer
    C. Vbc.exe
    Explanation
    The correct answer is vbc.exe. The Visual Basic Compiler is a program that is responsible for compiling Visual Basic code into executable files. The vbc.exe file is the executable file for the Visual Basic Compiler, which means it is the file that is run when compiling Visual Basic code.

    Rate this question:

  • 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

    Correct Answer
    A. Dim O as object=I ( as i an integer)
    Explanation
    The statement "Dim O as object=I ( as i an integer)" shows Boxing. Boxing is the process of converting a value type (such as an integer) to an object type (such as an object). In this statement, the integer variable I is being boxed by assigning it to the object variable O.

    Rate this question:

  • 15. 

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

    • A.

      3

    • B.

      5

    • C.

      32

    • D.

      Unlimited

    Correct Answer
    C. 32
    Explanation
    In VB.NET, the maximum number of dimensions that an array can have is 32. This means that an array can be created with up to 32 dimensions, allowing for complex and multi-dimensional data structures to be stored and manipulated in the program. Having this limit ensures that the program can efficiently handle and process arrays with a large number of dimensions without causing performance issues or excessive memory usage.

    Rate this question:

  • 16. 

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

    • A.

      Process

    • B.

      Application

    • C.

      Exe

    • D.

      Execute

    Correct Answer
    A. Process
    Explanation
    The Process class in VB.NET is used to run an EXE application file. It provides methods and properties to start, stop, and manipulate processes on the computer. By using the Process class, developers can launch external applications from their VB.NET programs and control them programmatically.

    Rate this question:

  • 17. 

    How do you join strings in VB.NET

    • A.

      +

    • B.

      &

    • C.

      Both A & B

    • D.

      None

    Correct Answer
    C. Both A & B
    Explanation
    In VB.NET, strings can be joined using the "+" operator or the "&" operator. The "+" operator is used for concatenating strings, while the "&" operator is used for concatenating strings and other data types. Therefore, the correct answer is Both A & B.

    Rate this question:

  • 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

    Correct Answer
    A. User.IsInRole(“Administrators”)
    Explanation
    The correct answer is User.IsInRole("Administrators") because this method is commonly used in many programming languages to check if the logged in user belongs to a specific role, in this case, the "Administrators" role. This method returns a boolean value, true if the user is in the specified role, and false if not.

    Rate this question:

  • 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

    Correct Answer
    A. System.IO
    Explanation
    The correct answer is System.IO. This namespace in the .NET framework provides classes that allow reading from and writing to files. It includes classes such as FileStream, StreamReader, and StreamWriter, which are commonly used for file operations. The other options, System.FileObjects and System.FileSystem, are not valid namespaces in the .NET framework. Therefore, the correct namespace to be used for file operations is System.IO.

    Rate this question:

  • 20. 

    In VB.NET default value for Boolean variable?

    • A.

      TRUE

    • B.

      FALSE

    • C.

      Nothing

    • D.

      Null

    Correct Answer
    B. FALSE
    Explanation
    In VB.NET, the default value for a Boolean variable is FALSE. This means that if a Boolean variable is not explicitly assigned a value, it will be automatically set to FALSE.

    Rate this question:

  • 21. 

    Which SQL statement is used to delete data from a database ?

    • A.

      Delete

    • B.

      Remove

    • C.

      Collapse

    • D.

      None of the above

    Correct Answer
    A. Delete
    Explanation
    The correct answer is "Delete" because the SQL statement "Delete" is used to remove data from a database. It allows users to delete specific records or entire tables from the database. This statement is commonly used to remove outdated or unnecessary data from the database, ensuring data integrity and optimizing database performance.

    Rate this question:

  • 22. 

    Which SQL statement is used to update data in a database ?

    • A.

      Save

    • B.

      Save As

    • C.

      Modify

    • D.

      Update

    Correct Answer
    D. Update
    Explanation
    The correct answer is "Update" because the SQL statement "Update" is specifically used to modify or update data in a database. It allows you to change the values of existing records in a table or multiple tables based on specified conditions. This statement is commonly used in database management systems to keep the data up-to-date and make necessary changes to the database.

    Rate this question:

  • 23. 

    Which SQL statement is used to extract data from a database ?

    • A.

      Open

    • B.

      Extract

    • C.

      Get

    • D.

      Select

    Correct Answer
    D. Select
    Explanation
    The SQL statement "Select" is used to extract data from a database. It is used to retrieve specific data from one or more tables in a database based on specified criteria. The "Select" statement allows users to specify the columns they want to retrieve, the table(s) they want to retrieve data from, and any conditions or filters that should be applied to the data. This statement is fundamental in SQL and is widely used in querying databases.

    Rate this question:

  • 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

    Correct Answer
    B. Master db
    Explanation
    The correct answer is "master db" because the master database is responsible for storing server-specific configuration information such as authorized users, databases, system configuration settings, and remote servers. It is a crucial system database that helps manage the overall functioning of the SQL Server.

    Rate this question:

  • 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

    Correct Answer
    A. Primary key
    Explanation
    A primary key column cannot contain NULL values since it is used to uniquely identify rows in a table. NULL values are not allowed in the primary key column because they would not be able to uniquely identify a row. The primary key is a unique identifier for each row in a table and is used to enforce data integrity and ensure that each row can be uniquely identified.

    Rate this question:

  • 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

    Correct Answer
    D. Entity Integrity
    Explanation
    Entity Integrity ensures that each row can be uniquely identified by an attribute called the primary key. The primary key is a unique identifier for each row in a table and ensures that there are no duplicate or null values in the primary key column. This ensures the integrity of the data by guaranteeing that each row can be uniquely identified and accessed.

    Rate this question:

  • 27. 

    Which of the following is a comparison operator?

    • A.

      +

    • B.

      <

    • C.

      And

    • D.

      Between and not between

    Correct Answer
    B. <
    Explanation
    The correct answer is "<". This is a comparison operator used to check if one value is less than another value.

    Rate this question:

  • 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

    Correct Answer
    D. All of the above
    Explanation
    Stored procedures offer a lot more flexibility by providing capabilities such as conditional logic. They are stored within the DBMS, which reduces bandwidth and execution time. Additionally, using stored procedures abstracts client developers from complex designs. Therefore, all of the given reasons are valid explanations for why stored procedures are used.

    Rate this question:

  • 29. 

    Which command is used for saving the transaction ?

    • A.

      Like

    • B.

      Set

    • C.

      Join

    • D.

      Commit

    Correct Answer
    D. Commit
    Explanation
    The command "Commit" is used for saving the transaction.

    Rate this question:

  • 30. 

    What will be the result of the following statement ?SELECT ROUND(689.89, -1, 1)

    • A.

      680

    • B.

      680.9

    • C.

      689.9

    • D.

      690

    Correct Answer
    D. 690
    Explanation
    The ROUND function is used to round a number to a specified number of decimal places or to the nearest whole number based on the given precision. In this case, the statement ROUND(689.89, -1, 1) will round the number 689.89 to the nearest 10th place. Since the precision is set to 1, the number will be rounded to the nearest whole number. Therefore, the result of the statement will be 690.

    Rate this question:

  • 31. 

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

    • A.

      !

    • B.

      @

    • C.

      #

    • D.

      $

    Correct Answer
    C. #
    Explanation
    The symbol "#" is used to create temporary tables in SQL Server. Temporary tables are used to store data temporarily within a session or a transaction and are automatically dropped when the session or transaction ends.

    Rate this question:

  • 32. 

    What is the maximum size of a row ?

    • A.

      8030 bytes

    • B.

      7080 bytes

    • C.

      8060 bytes

    • D.

      8000 bytes

    Correct Answer
    C. 8060 bytes
    Explanation
    The maximum size of a row in this context refers to the maximum amount of data that can be stored in a single row of a database table. The correct answer of 8060 bytes means that a row can contain up to 8060 bytes of data. This includes the actual data values as well as any additional overhead or metadata associated with the row.

    Rate this question:

  • 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;

    Correct Answer
    D. Select empno, count(*) from emp group by empno having count(*) >2;
    Explanation
    The correct answer is "select empno, count(*) from emp group by empno having count(*) >2;". This query groups the records in the emp table by empno and counts the occurrences of each empno. The "having" clause is used to filter the groups and retrieve only those with a count greater than 2. This will fetch the empno that occur more than twice in the emp table.

    Rate this question:

  • 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

    Correct Answer
    C. Correlated subquery
    Explanation
    A correlated subquery is a type of query within a query where the inner query is evaluated for each row in the outer query. This means that the inner query is dependent on the results of the outer query, and the inner query is executed multiple times, once for each row in the outer query. This allows for more complex and specific filtering or calculations to be performed in the query.

    Rate this question:

  • 35. 

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

    • A.

      128

    • B.

      256

    • C.

      512

    • D.

      1024

    Correct Answer
    B. 256
    Explanation
    A SQL Server 2000 stored procedure can have a maximum of 256 parameters.

    Rate this question:

  • 36. 

    Which is faster?

    • A.

      Union

    • B.

      Union All

    • C.

      Both are of equal efficiency

    • D.

      Can't be determined

    Correct Answer
    B. Union All
    Explanation
    The correct answer is Union All. Union All is faster than Union because it does not remove duplicate rows from the result set. Union, on the other hand, removes duplicate rows, which requires additional processing time. Therefore, Union All is more efficient in terms of speed compared to Union.

    Rate this question:

  • 37. 

    Expansion of SQL?

    • A.

      Structured Query Language

    • B.

      Simple Query Language

    • C.

      Small Query Language

    • D.

      None

    Correct Answer
    A. Structured Query Language
    Explanation
    SQL stands for Structured Query Language. It is a programming language that is used for managing and manipulating relational databases. SQL allows users to create, modify, and delete databases, as well as retrieve and manipulate data stored within them. It is a standardized language that is widely used in the field of database management systems. Therefore, the correct answer is Structured Query Language.

    Rate this question:

  • 38. 

    Which of the following aggregate functions returns a row count as an integer?

    • A.

      AVG

    • B.

      COUNT_BIG

    • C.

      STDEV

    • D.

      COUNT

    Correct Answer
    D. COUNT
    Explanation
    The COUNT function is an aggregate function that returns the number of rows in a specified column. It counts the number of non-null values in the column and returns the count as an integer. Therefore, the correct answer is COUNT.

    Rate this question:

  • 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

    Correct Answer
    D. Both A & C
    Explanation
    Both full outer join and left outer join allow you to retrieve nonmatching data. A full outer join returns all rows from both tables, including the ones that do not have matching values in the join columns. A left outer join returns all rows from the left table and the matching rows from the right table, but also includes nonmatching rows from the left table. Therefore, both A (full outer join) and C (left outer join) are correct answers for this question.

    Rate this question:

  • 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

    Correct Answer
    B. To execute the Quesry faster
    Explanation
    The correct answer is "To execute the Query faster." An index is a data structure that improves the speed of data retrieval operations on a database table. It works by creating a copy of selected columns from the table and organizing them in a specific order, allowing for faster searching and sorting. By using an index, the database engine can quickly locate the requested data, resulting in improved query performance.

    Rate this question:

  • 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

    Correct Answer
    A. Messagebox prompts i value 50 times
    Explanation
    The nested for loop iterates through the values of i from 1 to 10 and j from 1 to 5. Inside the inner loop, a messagebox is displayed with the value of i. Since the inner loop runs 5 times for each value of i, and there are 10 values of i in total, the messagebox is prompted 50 times with the value of i. Therefore, the correct answer is "messagebox prompts i value 50 times".

    Rate this question:

  • 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

    Correct Answer
    A. Current date
    Explanation
    The code snippet `s=mid(now,3,2)` extracts the 2 characters starting from the 3rd character of the current date and assigns it to the variable `s`. The `msgbox s` displays the value of `s`. Since the current date is being extracted, the message box will show the current date.

    Rate this question:

  • 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

    Correct Answer
    B. Cmb.Items.Add ("name")
    Explanation
    The correct answer is cmb.Items.Add ("name"). This is the correct way to add an item to a combo box named cmb. The "Items" property is used to access the collection of items in the combo box, and the "Add" method is used to add a new item to the collection. The item to be added is specified within the parentheses, in this case "name".

    Rate this question:

  • 44. 

    How do you center a form?

    • A.

      Size

    • B.

      Windowstate

    • C.

      Startposition

    • D.

      Padding

    Correct Answer
    C. Startposition
    Explanation
    The "startposition" property is used to determine the initial position of a form when it is displayed. By setting the "startposition" property to "centerparent", the form will be centered in its parent container. This means that the form will be positioned in the center of the screen or the center of its parent form, depending on the context. This property is useful when you want to ensure that the form is displayed in the center of the screen or its parent container, providing a visually balanced layout.

    Rate this question:

  • 45. 

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

    • A.

      True

    • B.

      False

    • C.

      Not possible

    • D.

      None

    Correct Answer
    A. True
    Explanation
    Yes, it is possible to send keystrokes to a DOS application from VB.Net. VB.Net provides various methods and functions that allow developers to interact with external applications, including DOS applications. By using the appropriate functions and APIs, developers can simulate keystrokes and send them to a DOS application, enabling automation or interaction with the application programmatically.

    Rate this question:

  • 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()

    Correct Answer
    D. Select getdate()
    Explanation
    The correct answer is "select getdate()" because the "getdate()" function is used in SQL Server to retrieve the current system date and time. By selecting "getdate()", the query will return the server's current date and time.

    Rate this question:

  • 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

    Correct Answer
    A. 123 KISHORE 37:02.4 Officer Computers
    Explanation
    The given answer displays the data from the Employee table in the sequence of Employee No, Employee Name, Emp Date of Birth, Designation, and Department. The answer correctly shows the data for Employee No as 123, Employee Name as KISHORE, Emp Date of Birth as 37:02.4, Designation as Officer, and Department as Computers.

    Rate this question:

  • 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) & "'

    Correct Answer
    C. Insert into employee " & val(textbox1) & ", '" & trim(textbox2) & "','" & textbox3 & "','" & trim(textbox4) & "','" & trim(textbox5) & "'
    Explanation
    The correct answer is "Insert into employee " & val(textbox1) & ", '" & trim(textbox2) & "','" & textbox3 & "','" & trim(textbox4) & "','" & trim(textbox5) & "'". This query is used to insert data into the employee table. It uses the values from the textboxes to populate the respective columns in the table. The val() function is used to convert the numeric value in textbox1 to a numeric data type, while the trim() function is used to remove any leading or trailing spaces from the string values in the textboxes.

    Rate this question:

  • 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

    Correct Answer
    D. A & b
    Explanation
    The correct answer is "a & b" because the ampersand (&) is the concatenation operator in Visual Basic. It is used to combine two strings together. In this case, textbox1.text and textbox2.text are being concatenated together to create a single string.

    Rate this question:

  • 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

    Correct Answer
    A. Item(0): RAMANUJA RAO P item(1): ASM-1 item(2): Asthana Mandapam item(3): 123
    Explanation
    The given code is a VBA code that splits a string variable "DA" using the "#" delimiter. The "Split" function is used to split the string into an array of substrings. The code then uses a loop to add each substring to a list box control called "List1". The loop iterates through the array of substrings and adds each substring to the list box with a label indicating its index.

    The correct answer shows the output of the code, which is the four substrings separated by line breaks. The substrings are:
    - "RAMANUJA RAO P"
    - "ASM-1"
    - "Asthana Mandapam"
    - "123"

    Rate this question:

Quiz Review Timeline +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Jan 04, 2024
    Quiz Edited by
    ProProfs Editorial Team
  • Sep 08, 2010
    Quiz Created by
    Abi333
Back to Top Back to top
Advertisement
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.