I have string like hp company.print tis like company hp.write a program in vbscripting



I have string like hp company.print tis like company hp.write a program in vbscripting ..

Answer / jp mumbai

Hi,

We can write a code in 2 ways. one is Generic Code and another is Hard Code.

In Generic Code:

Str="hp company"
ArrayStr=Split(Str)

For i = uBound(ArrayStr) to 0 Step-1
expStr=expStr &" "& ArrayStr(i)
Next

msgbox expStr

-------------------------------------------------

In Hard Code:

Str="hp company"
ArrayStr=Split(Str)

expStr= ArrayStr(1)&" "&ArrayStr(0)

msgbox expStr

Is This Answer Correct ?    2 Yes 0 No

Post New Answer

More VB Script Interview Questions

How to get the background color of a weblist?

3 Answers   Accenture,


HOW TO OPEN NEW TAB USING VB SCRIPT IN QTP?

1 Answers   TCS,


can any body give the code to write the function for given suppose user login with usrer id and pwd to yahoomail.after cliking "sign in"if it is valid user id the next page will display userid'message box.( Note u have to use excel sheet to retrive the userid's data)

3 Answers   Bally Technologies,


compare the string without using stringcomp function?

1 Answers   CSS Corp,


Explain the arrays in vb script?

0 Answers  






Illustrate briefly about the different types of statement

0 Answers  


how to write function to validate the number of characters entering into the text box?

2 Answers   TCS,


How can you have different number of cells for each row of a table in HTML?

2 Answers  


who will create the object?

0 Answers   Estuate,


We have an application which is built using multiple technologies and are using QTP as the tool for Automating the same. While we spy over a combo box in this application, we get the object name as a "Combo Control" and we are not able to perform any action over this object in either selecting or checking any method for the same like "Exist" etc. Hence we thought of a solution and the same can be found below

0 Answers  


What is difference between Active screen and movie screen recorder in QTP 9.2?

1 Answers  


How do you declare a variable in vbscript?

0 Answers  


Categories