CoolInterview.com - World's Largest Collection of Interview Questions
Send Free SMS
 Interview Questions  
 Our Services  


INTERVIEW QUESTIONS LANGUAGES C DETAILS
Question :
What is an argument ? differentiate between formal arguments and actual arguments?
Category C Interview Questions
Rating (4.3) By 7 users
Added on 10/22/2004
Views 5004
Rate it!
Answers:

An argument is an entity used to pass the data from calling funtion to the called funtion. Formal arguments are the arguments available in the funtion definition.They are preceded by their own data types.Actual arguments are available in the function call.



arguments are called as paramters .they are
passed from main function to subfunction.

formal arguments are located in subfunction.
actual arguments are located in function
the values of actual arguments
are copied to formal arguments.



 Posted by: raja    

Contact raja  Contact raja

The arguments listed in function definition are known as formal arguments. And the arguments passed to function while invoking it, are known as actual arguments.

For e.g:
-----------
int foo(int a, int b)
{
return (a+b);
}

int main(void)
{
int var1 = 10, var2 = 10;
int result;
result = foo(var1, var2);
return 0;
}

in the above case, var1 & var2 are actual arguments and "a" and "b" are formal arguments.



 Posted by: Ravi A Joshi    

Contact Ravi A Joshi  Contact Ravi A Joshi


If you have the better answer, then send it to us. We will display your answer after the approval.
Name :*
Email Id :*
Answer :*
Verification Code Code Image - Please contact webmaster if you have problems seeing this image code Not readable? Load New Code
Process Verification  Enter the above shown code:*
Inform me about updated answers to this question

   
Related Questions
View Answer
What is the purpose of main( ) function?
View Answer
What are the advantages of the functions?
View Answer
What is a method?
View Answer
What is a pointer value and address?
View Answer
What is a pointer variable?
View Answer
Are pointers integers?
View Answer
How are pointer variables initialized?
View Answer
What is static memory allocation and dynamic memory allocation?
View Answer
What is the purpose of realloc( )?
View Answer
Difference between arrays and pointers?
View Answer

Please Note: We keep on updating better answers to this site. Subscribe to our newsletter to get notified when better answer is posted.

Notify me when better answer is posted!
Email:

View ALL C Interview Questions

User Options
Sponsored Links


Copyright ©2003-2010 CoolInterview.com, All Rights Reserved.
Privacy Policy | Terms and Conditions
Page URL: http://www.coolinterview.com/interview/970/default.asp?cachecommand=bypass


Download Yahoo Messenger | Placement Papers| FREE SMS | ASP .Net Tutorial | Web Hosting | Free SMS | Dedicated Servers | Joke of the Day

0.95