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

Explain about tristate constants in vbscript?

0 Answers  


how to organize files in object repository of qtp

1 Answers  


write a vbscript for finding the sum of the numbers from 1- 50

3 Answers  


How to get 120 using 5 zeroes, you can use any operator(+, *, /...) in qtp.

2 Answers   Cognizant,


how many types of recording are there?

1 Answers  






What are the differences between Visual Basic, VBA and VBScript? When would it be appropriate to use one as opposed to another?

1 Answers   Infosys,


What is dictionary object in vbscript? Explain?

0 Answers  


Anyone have qtp11.0 crack?

0 Answers  


What are class properties?

0 Answers  


What are lbound and ubound in the vbscript language?

0 Answers  


1. How to handle object implementation change in DP for Ex: i have login page with username,pasword (editboxes),login,cancel(buttons). Here i written DP code for login page with the help properties. My questions: 1.If properites are changing dynamically i will do (i want code for that) 2.if objects are changed dynamcally i will do (i wnat code for that)

0 Answers   iFlex,


What is the use of the ‘open’ method to work with the database in the vbscript language and what connection string is passed in the same and what is its usage?

0 Answers  


Categories