Imagine you have a string variable that holder a credit
card (16digit). There are multiple ways of obtaining last
four digits of this number programmatically on a run time.
Name one; for practical purpose variables name is sCCnumber?

Answers were Sorted based on User's Feedback



Imagine you have a string variable that holder a credit card (16digit). There are multiple ways of..

Answer / smitha

Use Right function
sSubstring = Right (sString, iNumChars)

Eg. sCCnumber = "123456786543245"

Print ( right (sCCnumber ,4)

Is This Answer Correct ?    2 Yes 0 No

Imagine you have a string variable that holder a credit card (16digit). There are multiple ways of..

Answer / ruchi

String sCCnumber = "123456786543245"

sCCnumber=Substr(sCCnumber,12,4)

Is This Answer Correct ?    1 Yes 0 No

Imagine you have a string variable that holder a credit card (16digit). There are multiple ways of..

Answer / sateesh_t7101@yahoo.co.in

i think use Edit_get_selection
if wrong plz ....

Is This Answer Correct ?    0 Yes 0 No

Imagine you have a string variable that holder a credit card (16digit). There are multiple ways of..

Answer / uday kumar. a

Just use the mod operator.

Say x=1234567
then modValue=x mod 10000

The modValue has a value of 4567

Another technique is by using substring function.

Try solution for substring function

Is This Answer Correct ?    0 Yes 0 No

Imagine you have a string variable that holder a credit card (16digit). There are multiple ways of..

Answer / vimalkanth

Try using stuff method. The examples defined in help are
good enough.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Silk Test Interview Questions

How to select a group of test cases in a testplan to run?

0 Answers  


Where are the testplan attributes stored?

0 Answers  


What are the important aspects of a test case?

0 Answers  


hai iam not working.iam try to job.on practice i have dout .HOW TO TEST THE CALCULATOR BY USING DATA DRIVEN.PLS REPLY WITH CODE.I HAVE NO IDEA ON DATA DRIVEN.

2 Answers   Aricent, Cincom,


How to run a test case from a test script file?

0 Answers  


In SilkTest we have a function Except Log which displays the path of the error occured in a Script.In QTP do we have any function like that?

0 Answers   CSS,


How to test your defaultbasestate?

0 Answers  


How to download latest silk test trial version?

0 Answers  


How to run a test case from a testplan file?

0 Answers  


How can you read the contents of PDF using silktest?

2 Answers  


What are the reasons behind silk test hanging? Is any particular problem or it is just because of system problem.?

2 Answers  


In how many ways we can perform datadriven test in silk test, throgh flatfiles can we perform?

3 Answers  


Categories