YouTube Icon

Interview Questions.

Top 100+ Vbscript Advanced Interview Questions And Answers - Jun 02, 2020

fluid

Top 100+ Vbscript Advanced Interview Questions And Answers

Question 1. Explain About Vb Script?

Answer :

VB script is a Microsoft programming language and it resembles a decrease version of the VB. It is an Active Scripting language. This scripting language is covered in home windows working system with the aid of default. With using msscript.Ocx you may set up VB Script.

Question 2. Give Examples Where Vb Script Can Directly Run On Users System With Windows As Os?

Answer :

A easy instance detailing the strolling of VB Script is by utilising Windows Script host environment. Visual primary is a stand by myself application which has a .Vbs as extension. Input can be provided via graphical consumer interface and output can be received by Wscript.Exe from conversation and input boxes. From command line it could be invoked by means of Cscript.Exe.

QTP Interview Questions
Question three. Explain About .Wsf Files?

Answer :

.Wsf documents are modeled in much like XML. They may be performed with the help of Wscript.Exe and it can be achieved from the command line additionally. This .Wsf file can have multiple visual primary documents. Reuse functionality is gift with this extension report.

Question 4. Explain About The Extension .Hta?

Answer :

.Hta extension is used whenever you need to include a VB script in HTML. Here HTML acts as an interface and VB Script because the programming language. .Hta extension files do run inside the secure and trusted quarter of Internet explorer. Although they run within the depended on area querying is restricted because it has to pass the recommendations of internet explorer.

QTP Tutorial
Question 5. Explain Some Uses Of Vb Script?

Answer :

If functionality aspect is taken into consideration VB Script acts much like Java Script but it's miles like minded simplest on net explorer. They engage with Document item version. Visual primary script can also be used for server aspect processing with ASP.

Visual Basics Interview Questions
Question 6. Compare Java Script And Vb Script?

Answer :

VB and Java Script are a lot comparable in capability. They both have interaction with the record object model of the page. Many browsers fit with Java Script but they're now not like minded with VB script as such. For client side scripting builders using VB Script ought to constantly make sure of pass browser compatibility which is not the case while working with VB script.

Question 7. Explain About The Support Of Asp For Vb Script Functionality?

Answer :

Visual Basic should depend upon ASP for sever aspect processing. Asp.Dll is used to make VB Script run on ASP engine and it invokes vbscript.Dll. VB Script must be embedded with in <% and %> context switches. ASP can offer various functionality to VB Script.

VB Script Tutorial Active Directory Interview Questions
Question eight. Explain About The Functionality Of Vb Script?

Answer :

Active X technology can be used to present lots greater capability to VB Script. VB offers sub exercises, capabilities, string manipulation, statistics/time, mistakes dealing with, and so forth. VB can have extra capability brought to it by means of running with languages along with ASP.

Question 9. Explain About Scrrun.Dll?

Answer :

Scripting Runtime library may be very vital for the functioning of Visual fundamental script because it gives a good deal extra functionality including File management, textual content operations and report change capabilities. Scrrun.Dll is used very plenty in programming VB.

ActiveX Interview Questions
Question 10. Explain About Adodb.Flow Class?

Answer :

ADODB.Stream class may be used as string builder. VBScript string concatenation may be very luxurious due to common memory allocation functions. Binary document and reminiscence I/O operation is provided by ADODB.Stream magnificence. This is broadly used to convert bytes into string, etc.

Software testing Tutorial
Question 11. Explain About Arrays In Vb Script?

Answer :

Arrays in VB Script need to be assigned within the variation separated through a comma. If arguments aren't specific then the string is appeared as empty. After specifying the factors in an array an index wide variety ought to be used indicating the favored element.

VB Script Interview Questions
Question 12. Explain About The Asc Function?

Answer :

According to the primary letter in a string it returns the ANSI code relevant to that first letter. If string is not gift then a runtime blunders takes place. Asc characteristic returns the first byte used. It is used handiest with elements containing byte information in a string.

QTP Interview Questions
Question thirteen. Explain About Filter Expression?

Answer :

Filter expression returns an array primarily based on a specific filter seek condition and it returns a zero primarily based array. Arguments covered in the filter array are Input strings, cost, include and compare. If there is no match for the value it returns an empty string.

Script.Aculo.Us Tutorial
Question 14. Explain About Constants In Vb Script?

Answer :

There are many useful constants found in Visual primary script which you can use to your code. They ease your paintings load with the aid of remembering fee and implementing in the code. Maintenance is easy with VB Script due to the fact it could effortlessly alternate the function of constants.

Question 15. Explain About Tristate Constants?

Answer :

Tristate constants may be used with features which allow formatting of numbers. These constants may be used with VB Script without defining them. It can be used everywhere in the code to mirror and constitute the values.

Software testing Interview Questions
Question sixteen. Explain About Operator Precedence In Vb Script?

Answer :

In operator priority expressions are evaluated and resolved in a predetermined order. The order of assessment can be modulated if you use parenthesis. Expressions found in parenthesis are evaluated first.

Software Development Lifecycle (SDLC) Tutorial
Question 17. What Are The Different Types Of Operators And Their Order Of Precedence?

Answer :

Order of assessment of operators is, first arithmetic operators are evaluated, and evaluation operators are evaluated subsequent and on the final logical operators are evaluated at the closing. In mathematics operators negation, Exponentiation, multiplication and division, integer division, modulus arithmetic, addition and subtraction and string concatenation are furnished.

Test Cases Interview Questions
Question 18. What Is Event Handling In Vbscript?

Answer :

The movements which can be performed through clicking, pressing keys, moving mouse, dragging and losing and so on are known as as events. Event handling is the manner to seize those events and perform the movements hence.

Visual Basics Interview Questions
Question 19. Explain Few Date Functions In Vbscript?

Answer :

Date(),
Time(),
Now(),
Left(),
Right(),
Mid()
Unittest Framework Tutorial
Question 20. What Are String Functions In Vbscript?

Answer :

Asc() - Returns ANSI Character Code
Chr() - Returns Character from ANSI Code
InStr() - Find a string inside any other
InStrRev() - Find a string within any other (Reverse)
LCase() - Convert a string to lowercase
Left() - Crops a string from left
Len() - Determine the length of a string
LTrim() - Remove leading areas from a string
Mid() - Crops a string
Replace() - Replace a substring within a string
Right() - Crops a string from right
RTrim() - Remove trailing spaces from a string
Space() - Creates a string with the specified number of areas
StrComp() - Compare two strings
String() - Creates a repeated man or woman string
StrReverse() - Reverse the characters of a string
Trim() - Remove each main and trailing spaces from a string
UCase() - Convert a string to uppercase
Software Development Lifecycle (SDLC) Interview Questions
Question 21. Explain Vbscript In Detail?

Answer :

This is a scripting language evolved with the aid of Microsoft and is based totally loosely on Visual Basic. Its functionality in a web environment is defendant upon either an ASP engine or the Windows Scripting Host, and ought to be used on a Windows web hosting platform.

Question 22. How To Open Browser In Vb Script?

Answer :

set ie=createobject(“internetexplorer.Utility”)
ie.Navigate(“http://www.Google.Co.In/”)
ie.Seen=actual
set ie = nothing
QUnit Testing Tutorial
Question 23. Why To Use Option Explicit In Vb Script?

Answer :

If we declare variables with a few values and even as the usage of if we use (spell mistake) then consumer can’t know

‘ placing alternative specific is beneficial there
‘ Example starts offevolved here
option specific
dim abcd
abcd=20
msgbox abcd
dim bcde
bcde=30
msgbox bcdef
Unittest Framework Interview Questions
Question 24. How To Open A File. What Is The Perpose Of True And False Mode There?

Answer :

How to read from document and write into the file

set files = createobject(“scripting.Filesystemobject”)
set obj1=files.Opentextfile(“d:file2.Txt”,2,real)
‘ authentic makes use of for ceating txt report
set obj2=files.Opentextfile(“d:file2.Txt”,1,fake)
‘ fake will not create any file
obj1.Writeline(“write this line into document”)
str=obj2.Readline
msgbox str
set documents=nothing
Active Directory Interview Questions
Question 25. If Else For Do While Select In Vb Script?

Answer :

i=5
j=6
if i>j then
msgbox i
elseif i msgbox j
else
msgbox “not anything”
quit if
for i=5 to 10 step 2
msgbox i
subsequent
do even as i<15
msgbox i
i=i+three
loop
mycase=”gitam”
select case mycase
case “abcd”
msgbox  “abcd”
case mycase
msgbox mycase
case else
msgbox “incorrect”
quit pick
TypeScript Tutorial
Question 26. How To Write Functions And Sub In Vb Script?

Answer :

function add(a,b)
sum=a+b
add=sum
quit function
s=add(6,8)
msgbox s
sub add2(x,y)
sum=x+y
msgbox sum
stop sub
call add2(6,8)
QUnit Testing Interview Questions
Question 27. What Is Variant In Vb Script?

Answer :

Variant is the handiest datatype in vb script.There are many subtypes underneath variant.They are Empty, Null, Boolean, Byte, Integer, Currency, Long, Single, Double,Date, String, Object, Error.

ActiveX Interview Questions
Question 28. How To Open Excel In Vb Script?

Answer :

set xl=createobject(“excel.Utility”)
set wb=xl.Workbooks.Open(“d:/pattern.Xls”)
set ws=wb.Worksheets(1)
ws.Cells(three,4)=”welcome”
wb.Shop
wb.Near
set wb=nothing
set ws=not anything
set xl=not anything
Question 29. Difference Between Dim,public And Private Variables In Vb Script?

Answer :

Use of dim ,non-public and public variables in vb script feature first

dim a

a=20

msgbox a      ‘ 20 displays

quit function

first

msgbox a   ‘ this gives empty cost

‘ so dim variables aren't public if we use within feature

dim b

b=30

function 2nd

msgbox b ‘ 30 displays

give up feature

second

‘ if we claim dim variables outdoor the function then it'll act as public

magnificence  myclas

public c

personal d

dim e

sub mysub

c=40

d=50

e=60

msgbox “public:“&c&” non-public :”&d&”dim :”&e

end sub

give up elegance

set obj=new myclas

obj.Mysub

msgbox obj.C

‘msgbox obj.D ‘it won’t permit to show private

variables

msgbox obj.E

                 
Microsoft Visual C++ Interview Questions
Question 30. What Is Difference Between Vbscript And Vba?

Answer :

VBScript is a subset of Visual Basic for Applications, but there are still many differences:

VBScript doesn't have a debugger like Visual Basic or you could say that VBScript does no longer offer any debugging capabilities.You'll inn to the usage of lots of message packing containers, rather.

Unlike Visual Basic and Visual Basic for Applications, in which the developer can define the information type of a variable earlier, all variables in VBScript are variations.

There isn't any included development surroundings for VBScript that parallels the IDE for Visual Basic and Visual Basic for Applications.

Because variables are untyped and code is not compiled, all external objects instantiated in VBScript code are necessarily late-certain. This has a number of implications. First, late binding commonly involves a good sized overall performance penalty in comparison to early binding. Second, at the same time as the properties and techniques of early-sure objects can be examined in Visual Basic or hosted VBA environments the use of the Object Browser, this isn't the case with past due-sure items. Finally, the help centers to be had for early-bound items in VB and VBA (like Auto List Members and Auto Quick Info) aren't to be had, making syntax errors more likely and equipped get entry to to right documentation all of the greater vital.

Question 31. What Is The Difference Between Function And Procedure?

Answer :

A function, which is known as otherwise from a subroutine, returns a value to the code that calls it, even as a manner (subroutine) does now not. Functions need to be set same to a return value:

Variable_1 = My_Function(A, B, C)

A subroutine, then again, isn't set to a variable. It may be known as like

My_Subroutine A, B, C
Or
Call My_Subroutine(A, B, C)

Question 32. Is Vbscript A Case-touchy Or Case-insensitive?

Answer :

VBScript is a case-insensitive programming language; i.E. Case is neglected while studying VBScript scripts. So myVar, MyVar, MYvar all talk to the equal variable.

TypeScript Interview Questions
Question 33. What Are The Data Types Supported By Vbscript?

Answer :

VBScript has handiest one facts type called a Variant. There are one-of-a-kind classes of facts that may be contained in a Variant, called subtypes. These subtypes are:

Empty, Null, Boolean, Byte, Integer, Long Single, Double, Date/Time, Currency , String , Object and Error.

VB Script Interview Questions
Question 34. By Default In Vbscript The Arguments Passed To Functions And Subroutines Are By Reference Or By Value?

Answer :

By default, arguments are exceeded to features and subroutines via reference; this is, the cope with of the argument is furnished to the feature or subroutine.

Question 35. Which Function Allows You To Instantiate An Object Given Its Programmatic Identifier Or Progid?

Answer :

CreateObject function.

Question 36. What Is Dictionary Object In Vbscript? Explain?

Answer :

The Dictionary item shops name / price pairs (known as the key and item respectively) in an array.

Write the underneath code in a notepad and save it with a .Vbs extension and run it from Command Prompt with the aid of simply typing the name of the document.

Dim Beers

Set Beers = CreateObject("Scripting.Dictionary")
Beers.Add "a", "Strauss"
Beers.Add "b", "Kingfisher"
Beers.Add "c", "Budweiser"
Msgbox ("The cost similar to the important thing'b'is"&Beers.Item("b"))
The Dictionary object has many properties like Count, Item, CompareMode etc and plenty of strategies like Exists, Add, and Keys and so on.

Software testing Interview Questions
Question 37. What Is The Difference Between A Dictionary And An Array?

Answer :

A dictionary can not be multidimensional but an array can be.

A dictionary has greater techniques to add new items and test for existing objects.

When you delete a specific object from a dictionary, all the subsequent gadgets mechanically shift up. For example, in case you delete the second one item in a 3-object dictionary, the authentic 0.33 object mechanically shifts up into the second one-item slot.

Question 38. What Is The Purpose Of On Error Resume Next Statement?

Answer :

The On Error Resume Next assertion offers you a few diploma of errors handling by preventing application interruptions from runtime errors.

When an error takes place, by the usage of this announcement, the line of code containing the mistake is without a doubt skipped over and the program keeps.

On Error Resume Next statement does not correct an errors, just ignore it, without even displaying the mistake message.

The Statement essentially has  approaches it's far used. First to show off the script engine blunders checking:

On Error Resume Next

The 2nd is to show it on, thereby permitting the script engine to prevent execution of a script while an mistakes is encountered. Like so:

On Error Goto 0

Question 39. Which Object Provide Information About A Single Runtime Error In A Vbscript?

Answer :

Err Object.

Question forty. What's The Difference Between Vbscript And Vb.Internet?

Answer :

VBScript is script - a text-based totally code that gets interpreted with the aid of a "host", like the Windows Script Host or IE. VB.Net is a semi-compiled language for writing java-like software.

Test Cases Interview Questions
Question 41. Which Command Is Used For Writing Text On A Page?

Answer :

Document.Write (textual content).

Question forty two. What Aspects Of Vbscript Make It Safe So That A Web Page Using Vbscript Cannot Destroy Or Corrupt Information On A User's Computer?

Answer :

The VBScript code that comes alongside in a Web page can not directly get admission to any files at the customer's pc. This prevents a Web page from making any changes to sensitive documents on the consumer's laptop. VBScript is likewise very safe in that it does not provide programmers the ability to create unrecoverable crashes by means of distinctive feature of its language syntax.

Software Development Lifecycle (SDLC) Interview Questions
Question 43. Write The Code Required Within A Procedure To Create A Variable For Storing Your Name With Vbscript Code. Assign Your Name To That Variable?

Answer :

Dim Name

Name = "Harry Manis"

Question forty four. Assume You Have A Variable Called Age That Contains An Age Provided By The User. Write The Code That Ensures That The User Has Entered A Number As Her Age. If The User Hasn't Entered A Number, Tell Her She Needs To Enter Her Age Correctly?

Answer :

If IsNumeric(Age) = False Then

MsgBox "The length need to be more than a few. Please kind it again."
End If
Question forty five. Write A Vbscript Procedure That Converts Feet To Inches. Hint: There Are 12 Inches In A Foot?

Answer :

Option Explicit

Sub feet_to_inch()
Dim Inches, Feet
Feet=inputbox("Enter toes value ")
Inches = Feet * 12
MsgBox "There are " & Inches & " inches in " & Feet & " ft."
End Sub 
Call feet_to_inch()
Question forty six. Why Is The Use Of Exit Do Or Exit For Statements Within Loops Discouraged?

Answer :

These statements are applicable for particular conditions, however they often make code much less readable, which makes it hard for others who observe your code to recognise what is honestly taking place. If you ensure the best way out of a loop is to not fulfill the loop's situation, it is an awful lot less difficult to follow your code. Often, breaking out of a loop by way of force with an exit declaration is an indication of a poorly built loop with a circumstance that doesn't meet your goals. Take a look at the loop structure and condition again to make sure you are no longer leaving some thing out.

Question 47. What Is The Difference Between Vb Debugger And The Script Debugger?

Answer :

Difference among VB Debugger and the Script Debugger:

No "on the fly" modifying

Because the scripting window is examine-best, you can't edit the code at some stage in execution, as you can most of the time with VB.

No Instant Watch (Shift-F9)

The VB debugger's immediately watch facility, which allows you to highlight a variable on your code, press Shift-F9, and spot the fee of the variable, isn't always to be had in the Script Debugger.

Cannot set watches Watches do now not exist in the Script Debugger.

Cannot set the next assertion Using the VB Debugger, you can place the cursor on a line of code and, by way of clicking CTRL-F9, have program execution resume at that line. This is specially useful to back down or to re-execute a phase of code. Unfortunately, this option isn't to be had in the Script Debugger.

Question forty eight. Explain Few Date Functions In Vbscript?

Answer :

Date(), Time(), Now(), Left(), Right(), & Mid()

Question 49. What Is The Function Of Smon?

Answer :

The SMON background method plays all system monitoring capabilities at the oracle database.
Each time oracle is re-started out, SMON plays a warm start and makes positive that the transactions that were left incomplete at the final shut down are recovered.

SMON performs periodic cleanup of brief segments which can be no longer needed.

Question 50. Explain Different Types Of Segment?

Answer :

There are four styles of segments used in Oracle databases:

information segments
index segments
rollback segments
temporary segments
Data Segments:

There is a unmarried records section to keep all of the facts of each non clustered table in an oracle database. This facts segment is created when you create an item with the CREATE TABLE/SNAPSHOT/SNAPSHOT LOG command. Also, a records segment is created for a cluster whilst a CREATE CLUSTER command is issued. The garage parameters manage the manner that its records segment's extents are allocated. These have an effect on the performance of facts retrieval and garage for the statistics section associated with the object.

Index Segments:

Every index in an Oracle database has a unmarried index section to keep all of its records. Oracle creates the index section for the index when you trouble the CREATE INDEX command. Setting the garage parameters at once affects the efficiency of statistics retrieval and storage.

Rollback Segments:

Rollbacks are required when the transactions that have an effect on the database need to be undone. Rollbacks are also wished all through the time of device failures. The manner the roll-sponsored data is saved in rollback section, the information can also be redone that's held in redo phase.

A rollback section is a portion of the database that records the actions of transactions if the transaction must be rolled lower back. Each database carries one or more rollback segments. Rollback segments are used to offer read consistency, to rollback transactions, and to recover the database.

Types of rollbacks:

declaration stage rollback
rollback to a savepoint
rollback of a transaction due to user request
rollback of a transaction due to peculiar procedure termination
rollback of all brilliant transactions when an example terminates abnormally
rollback of incomplete transactions at some stage in restoration.
Temporary Segments:

The SELECT statements want a transient garage. When queries are fired, oracle wishes place to do sorting and other operation because of which temporary storages are useful.

The instructions that may use transient storage whilst used with SELECT are:

GROUP BY, UNION, DISTINCT, and so on.

Question 51. Explain Sga Memory Structures?

Answer :

SGA (System Global Area) is a dynamic reminiscence place of an Oracle Server. In SGA,the allocation is accomplished in granuels. The size of the SGA is dependent on SGA_MAX_SIZE parameter.

The reminiscence systems contained through SGA are:

Shared Pool :

this memory structure is split into two sub-systems which are Library Cache and Data Dictionary Cache for storing these days used PL/SQL statements and the current records definitions. The maximum length of the Shared Pool depends on the SHARED_POOL_SIZE parameter.

Database Buffer Cache :

This reminiscence shape improves the overall performance even as fetching or updating the lately used statistics because it shops the currently used datafiles. The length of this block is decided by way of DB_BLOCK_SIZE.

Redo Log Buffer :

This reminiscence structure is used to shop all of the modifications made to the database and it is usually used for the facts recovery functions. The length of this block is decided with the aid of LOG_BUFFER.

Java Pool :

This memory structure is used while Java is hooked up on the Oracle server. Size that can be used is stored in parameter named JAVA_POOL_SIZE.

Large Pool :

This reminiscence structure is used to lessen the load of the Shared Pool, because the Session memory for the Shared Server, as the brief storage for the I/O and for the backup and restore operations or RMAN. Parameter that stores the maximum size is LARGE_POOL_SIZE.

Question fifty two. What Is Sql Loader? Explain The Files Used By Sql Loader To Load File?

Answer :

SQL*Loader is a bulk loader utility used for shifting records from external files into the Oracle database. SQL*Loader helps various load codecs, selective loading, and multi-desk hundreds. When a manipulate report is fed to an SQL*Loader, it writes messages to the log file, horrific rows to the terrible document and discarded rows to the discard file.

Control record:

The SQL*Loader control record includes facts that describes how the information might be loaded. It consists of the table name, column datatypes, field delimiters, etc.

Controlfile.Square should be used to generate an correct manage document for a given table.

Log File:

The log report contains records approximately the SQL*loader execution. It need to be regarded after each SQL*Loader task is entire.




CFG