Given a string variable contain a full name (last name,
first name), using vbscripting, how can you extract first
and last name and save them into two different variables.

Answers were Sorted based on User's Feedback



Given a string variable contain a full name (last name, first name), using vbscripting, how can yo..

Answer / uday

Use split method.

Here is the ex:

str="Uday,Anem" 'where Uday is first name and Anem is last
name
arr=split(str,",")
firstname=arr(0)
lastname=arr(1)

msgbox(firstname+" "+lastname)

Is This Answer Correct ?    8 Yes 2 No

Given a string variable contain a full name (last name, first name), using vbscripting, how can yo..

Answer / naveen arora

fullname = "Arora Naveen"
last = Left(fullname, InStr(1, fullname, " "))
print last
first = Right(fullname, InStr(1, fullname, " "))
Print first

Is This Answer Correct ?    5 Yes 1 No

Post New Answer

More QTP Interview Questions

what are the mandatory and assistive properties of objects in QTP?What is attached text?Plz assist me with proper answer.

7 Answers   MBT,


What are output values and why they are used ?

0 Answers  


key word driven frame work is like a folder structure Question is that where is the folder like funtion library folder,object repository,data base,application scenerio folder etc are store whether in a remote machine where we have to access or in our machine (it just like VSS)

0 Answers   Kanbay,


How can we encrypt the username using recording mode in login window? There is 2 encrypted types what are it

1 Answers   TCS,


What is the extension of the qtp local repository? If it is .mtr then what is .bdb extension stands for?

0 Answers  


what is keyword driven framework in qtp.

13 Answers   Cognizant, TCS,


How can you close the second opened browser?

0 Answers  


Explain how you can find the absolute value of the number in qtp?

0 Answers  


How do you change Logical Name of the object in test script?

1 Answers   TCS,


1. What is the difference between Keyword and function in the keyword driven framework? 2. How do you associate Keywords to the script ?

0 Answers  


what QTP Options do you know?

0 Answers  


WHAT IS ETL TESTING.......

2 Answers  


Categories