Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

11/30/2015 VBScriptSyntax(50Examples)

10thJune2009 VBScriptSyntax(50Examples)
1PrintHelloWorld
2Findwhethergivennumberisaoddnumber
3Printoddnumbersbetweengivenrangeofnumbers
4Findthefactorialofagivennumber
5Findthefactorsofagivennumber
6Printprimenumbersbetweengivenrangeofnumbers
7Swap2numberswithoutatemporaryvariable
8WriteaprogramtoPerformspecifiedArithmeticOperationontwogiven
numbers
9Findthelengthofagivenstring
10Reversegivenstring
11Findhowmanyalphacharacterspresentinastring.
12Findoccurrencesofaspecificcharacterinastring
13Replacespacewithtabinbetweenthewordsofastring.
14WriteaprogramtoreturnASCIIvalueofagivencharacter
15WriteaprogramtoreturncharactercorrespondingtothegivenASCIIvalue
16ConvertstringtoUpperCase
17Convertstringtolowercase
18WriteaprogramtoReplaceawordinastringwithanotherword
19CheckwhetherthestringisaPOLYNDROM
20Verifywhethergiventwostringsareequal
21PrintallvaluesfromanArray
22SortArrayelements
23Addtwo3X3matrices
24MultiplyTwoMatricesofsize2X2
25ConvertaStringintoanarray
26ConvertaStringintoanarrayusingIasdelimiter
27Findnumberofwordsinstring
28Writeaprogramtoreversethewordsofagivenstring.
29PrintthedataasaPascaltriangle
30Joinelementsofanarrayasastring
31Trimagivenstringfrombothsides
32Writeaprogramtoinsert100valuesandtodelete50valuesfromanarray
33Writeaprogramtoforcethedeclarationofvariables
34Writeaprogramtoraiseanerrorandprinttheerrornumber.
35FindingwhetheravariableisanArray
36WriteaprogramtoConvertvalueintoacurrency
37WriteaprogramtoConvertanexpressiontoadate
38DisplaycurrentdateandTime
39Finddifferencebetweentwodates.
40Addtimeintervaltoadate
41Printcurrentdayoftheweek
42ConvertDatefromIndianFormattoUSformat
43Findwhethercurrentmonthisalongmonth
44Findwhethergivenyearisaleapyear

http://ravisalunkhe.blogspot.in/2009/06/vbscriptsyntax50examples_10.html 1/2
11/30/2015 VBScriptSyntax(50Examples)

45FormatNumbertospecifieddecimalplaces
46WriteaprogramtoGenerateaRandomNumber
47WriteaprogramtoshowdifferencebetweenFixandInt
48Writeaprogramtofindsubtypeofavariable
49Writeaprogramtoprintthedecimalpartofagivennumber
50WriteaFunctiontoreturnarandomnumber
51WriteaFunctiontoaddandmultiplytwonumbers
52WriteaSubProceduretoprintHelloWorld
53WriteaSubProceduretoaddandmultiplytwonumbers
54WriteaprogramtolisttheTimezoneoffsetfromGMT

Posted10thJune2009byRaviSalunkhe
Labels:AutomationTesting,HPTestingTools,QTP,QTPQuestions,QuickTestProfessional,Scripting
Language,SoftwareTesting,TestingTools,VBScript,VBScriptQuestions

0 Addacomment

Enteryourcomment...

Commentas: VulisettySiridurga(Google) Signout


Publish Preview Notifyme

http://ravisalunkhe.blogspot.in/2009/06/vbscriptsyntax50examples_10.html 2/2

You might also like