ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
Do you have a collection of Interview Questions and interested to share with us!!
Please send that collection to along with your userid / name. ThanQ
Google
 
Categories  >>  Software  >>  Testing  >>  Automation Testing  >>  QTP
 
 


 

 
 WinRunner interview questions  WinRunner Interview Questions
 Load Runner interview questions  Load Runner Interview Questions
 QTP interview questions  QTP Interview Questions
 Test Director interview questions  Test Director Interview Questions
 Rational TestSuite interview questions  Rational TestSuite Interview Questions
 Silk Test interview questions  Silk Test Interview Questions
 Automation Testing AllOther interview questions  Automation Testing AllOther Interview Questions
Question
What is difference between function and procedure?
 Question Submitted By :: Suma
I also faced this Question!!     Rank Answer Posted By  
 
  Re: What is difference between function and procedure?
Answer
# 1
Action is a part of Function.
Function is a Like a Functional Test case.
Procedure is a process to perform the Different Actions
 
Is This Answer Correct ?    16 Yes 25 No
Deepika
 
  Re: What is difference between function and procedure?
Answer
# 2
function can return a value
procedure cannot return a value,
 
Is This Answer Correct ?    44 Yes 28 No
Prakash
 
 
 
  Re: What is difference between function and procedure?
Answer
# 3
1.Function returns a value, but a procedure may return or
may not return a value.
2.Function can take only input aurguments, but procedure may
take both input and out put parameters.
 
Is This Answer Correct ?    26 Yes 12 No
Ravi Kumar Battula
 
  Re: What is difference between function and procedure?
Answer
# 4
All are correct....
 
Is This Answer Correct ?    4 Yes 18 No
Vinod
 
  Re: What is difference between function and procedure?
Answer
# 5
Fuction returns a value whereas procedure doesnt return any
value 
if some function calling is dere den function switch over 2
d function definition part directly but procedure go from
top 2 down linearly
 
Is This Answer Correct ?    6 Yes 17 No
Siva
 
  Re: What is difference between function and procedure?
Answer
# 6
function can be called inside the select statement but not 
the procedure
 
Is This Answer Correct ?    17 Yes 5 No
S
 
  Re: What is difference between function and procedure?
Answer
# 7
Bot functions and procedures can return values. Apart from
this following are the differences

1) Functions are used for computations where as procedures
can be used for performing business logic

2) Functions MUST return a value, procedures need not be.

3) You can have DML(insert,update, delete) statements in a
function. But, you cannot call such a function in a SQL query..
eg: suppose, if u have a function that is updating a table..
you can't call that function in any sql query.
- select myFunction(field) from sometable; will throw error.

4) Function parameters are always IN, no OUT is possible

5) Function returns 1 value only. procedure can return
multiple values(max. 1024)

6) Stored Procedure :supports deffered name resoultion
Example while writing a stored procedure that uses table
named tabl1 and tabl2 etc..but actually not exists in
database is allowed only in during creation but runtime
throws error Function wont support deffered name resolution.
Stored procedure returns always integer value by default
zero. where as function return type could be
scalar or table or table values(SQL Server).
  Stored procedure is pre compiled exuction plan where as
functions are not.

7) A procedure may modifiy an object where a function can
only return a value.
 
Is This Answer Correct ?    33 Yes 5 No
Pranjal
 
  Re: What is difference between function and procedure?
Answer
# 8
Function means Lot of people gathering together and 
celeberate somthing.
Example:Birth day function,Marriage function
Procedure not somthing like that.
 
Is This Answer Correct ?    11 Yes 41 No
Manohar
 
  Re: What is difference between function and procedure?
Answer
# 9
Function must returs a value, but procedure can return more 
and not any value..

Fuction are used for check conditions, but procedures can 
be use check condition as well as for the bussiness logic.
 
Is This Answer Correct ?    5 Yes 4 No
Rajesh Trivedi
 
  Re: What is difference between function and procedure?
Answer
# 10
1.Funcan can return a valur but not procedure
2.Function can accept only one parameter IN but procedure 
can take IN or OUT or both parameters.
3.Procedure follows only linear execution but not function.
 
Is This Answer Correct ?    0 Yes 14 No
Abhishek Khare
 
  Re: What is difference between function and procedure?
Answer
# 11
Question:	Difference Between 	Procedure & 
Function?
1). Both functions and procedures can return values.

2). Both can return multiple values, like in the case of 
procedure it can return multiple values using OUT and INOUT 
type parameter, while in case of function used in Report 6i,
using "PLACEHOLDER COLUMN" you can return multiple values.

3). "Complete Reference" Book say that function can use 
parameters as IN, OUT, and INOUT as same as in Procedure.

/* 

create function syntax

The syntax for the create function command is more 
complicated than the syntax for the create procedure
command. At a high level, the syntax is

create [or replace] function [schema.] function
	[(argument [in | out | inout ] [nocopy] datatype
		[, argument [in | out | inout ] [nocopy] 
datatype]...
	)]
return datatype

*/

4). Function returns value using "Return" Key Word, where 
same key word can be used in Procedure to Terminate the 
program, with immidiate effect.

5). Functions are used for computations where as procedures
can be used for performing business logic.

6). Functions MUST Return a value, procedures need not be.

7). You can have DML(insert,update, delete) statements in a
function. 

8). You can call a function in a Select Query where as
not Procedure.

9). Function returns 1 value only where as Procedure can 
return
multiple values(max. 1024)

10). A procedure may modifiy an object where a function can
only return a value.
 
Is This Answer Correct ?    8 Yes 5 No
Anurag Arun Edlabadkar
 
  Re: What is difference between function and procedure?
Answer
# 12
1.Function always return a single value but procedure may 
return more than one value.
2.We can use functions in select statement but we can not 
use procedure in select statement.
3.There is possible of recurssive functionlike max(min
(something)),but there is nothing like in procedure.
4.In function we use a return keyword but in procedure no 
return keyword is used.
 
Is This Answer Correct ?    5 Yes 5 No
Babu
 
  Re: What is difference between function and procedure?
Answer
# 13
1.Function is mainly used in the case where it must return 
a value. Where as a procedure may or may not return a value 
or may return more than one value using the OUT parameter.
2.Function can be called from sql statements where as 
procedure cannot be called from the sql statements.
3.Functions are normally used for computations where as 
procedures are normally used for executing business logic. 
4.You can have DML (insert, update, delete) statements in a 
function. But, you cannot call such a function in a SQL 
Query.
5.A Function returns 1 value only. Procedure can return 
multiple values (max 1024). 
6.Stored Procedure: supports deferred name resolution. 
Example while writing a stored procedure that uses table 
named tabl1 and tabl2 etc...But actually not exists in 
database is allowed only in during creation but runtime 
throws error Function won’t support deferred name 
resolution. 
7.Stored procedure returns always integer value by default 
zero. whereas function return type could be scalar or table 
or table values
8.Stored procedure is precompiled execution plan where as 
functions are not.
9.A procedure may modify an object where a function can 
only return a value The RETURN statement immediately 
completes the execution of a subprogram and returns control 
to the caller.
 
Is This Answer Correct ?    5 Yes 4 No
Gunesh
 
  Re: What is difference between function and procedure?
Answer
# 14
1. Function can return only one value but procedure can return more than one, or may not return any value.

2. Function can be called from sql statements where as procedure cannot be called from the sql statements.

3. We can use functions in select statement but we can not use procedure in select statement.
 
Is This Answer Correct ?    1 Yes 1 No
Nafaji
 
  Re: What is difference between function and procedure?
Answer
# 15
Function and procedure hv got their own use.

The following are the difference between function and 
procedure..

1. Function can used with select/where clause , while 
procedure can't
2.we can call a function from a procedure ,but it is not 
possible to call a procedure from a function
 
Is This Answer Correct ?    3 Yes 1 No
Rias
 

 
 
 
Other QTP Interview Questions
 
  Question Asked @ Answers
 
OPening of notedpad in QTP to write and execute the coding?  2
What is difference b/w AOM,DOM,COM Have u ever is used ny of the models.If so why? GE1
w is datatable CTS5
Hello Everyone, In QTP we have one option Data Driver wizard that comes in Tools -> Data Driver. so, please tell me abtout the use of Add Value and Parameterize options available in Data Driver wizard. And also the concept of value, constants, Parameterized displayed in the wizard. Please explain by giving the example. Thanks in advance, Gaytri  2
does qtp need record and playback in realtime. plz tell exactly wat happens HP3
Diff B/w Webserver and Client Server  2
in how many ways we can write the user defined functions one way i know that i.e storing it in .vbs another way i does not know my friend said that .qtf or something but start with q letter can any buddy knows about this DigiTech3
we have one text box and one list box(list box appear in same page or another page) what ever the text enter in text box that must be displyed in list box as first one. for example if we enter 10 in text box that is the 1st item in list box . after that we enter 11 then 11 is the 1st item and 10 is 2nd item. the maximum limit of list box is 10 items. if we enter 11th item the 10th item is deleted and llth one is add as 1st one and 9th one goes to 10th position part2:maore than the answer for this question i want the the reason why testers go for this kind of risk.what is the use of we testers having these kind of attempts.is that not the problem with the developer .pls answer .real time users of tools.in which way these solutions help to test with r without affecting the developed souce code.  3
What kind of errors can b handled in QTP in real time scenario? AZTEC2
what is difference between application testing and product testing? IBM1
what is vmodel?advantages and disadvantages of vmodel? AZTEC3
How to test login page by using QTP  5
what are the settings to be done to make the recovery scenario created for one test to be used bye all the other tests. please tell me recovery scenario process in detail.  1
How to use Regular Expressions in QTP? give an example. Ordain-Solutions9
will QTP 9.2 run successfully on Linux(gui) operating system  1
What is the limitation to XML Checkpoints? CTS4
we have a link in a website or webtable How can we record link in that table or site? link is not static we don't know exact location of that link? how ? if u know pls give reply with script also? Covansys3
How to import the Test Results in QTP to an Excel sheet Sonata4
hi i have one issue while automating the script using QTP i want scrool down .i cannot do even using scrool down methqad is not working .the object will take WebElement plz is there any code help me  2
i'm using QTP 8.2. A person using QTP 9.0 sends me a QTP TestScript, same when i try to open , an error comes "unexpected file format". Why?? and how to resolve the problem??  2
 
For more QTP Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com