Hi all..I have two values. a=20 ,b=30
I want to perform c= a+b and c= a*b using user define
function.please anyone give the answer



Hi all..I have two values. a=20 ,b=30 I want to perform c= a+b and c= a*b using user define funct..

Answer / prathyusha

Res=Add (20,30)
msgbox Res
Function Add (a,b)
c=a+b
Add=c
End Function

Res1= Mul (20,30)
msgbox Res1

Function Mul (a,b)
c=a*b
Mul=c
End Function

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More VB Script Interview Questions

how to operate webobjects in a webpage using getobject function and then using generic methods?

0 Answers  


i have to open a notepad having no. of words in dat file by recording in qtp and then find a particular word and display true or false

0 Answers  


what is diff between static and dynaic arrys?

0 Answers  


Explain vbscript in detail?

0 Answers  


I need to get some data from data base and store this (retrieved) data in a excel sheet using VB script in QTP9.0 I have created connection for data base I have created as excels sheet by using Set XL=CreateObject("Excel.Application") XLworksheet.cells(1,1).value= rs.fields.item("<<The data retrieved from data base >>") I have taken a for loop and changed the cells values (1 as i and another 1 as j) But still I am not able to get Plz kindly tell me know this . It is very urgent

0 Answers  






When inserting strings into a SQL table in ASP what is the risk and how can you prevent it?

1 Answers  


How you can call vbscript functions?

0 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,


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,


how to find number of characters(letter a) in the sentence Rain Rain Go away

4 Answers  


what is the code in QTP to take screen shot? Please send me any one to my mail id. my mailid is manu.sanepalli@gmail.com

4 Answers   TCS,


Description.Create

0 Answers   IBM,


Categories