variable names in function definition, call and declaration
Posted
by yCalleecharan
on Stack Overflow
See other posts from Stack Overflow
or by yCalleecharan
Published on 2010-04-05T23:15:42Z
Indexed on
2010/04/05
23:33 UTC
Read the original article
Hit count: 322
Hi, I see C books that use the same variable names in the function definition, calling function and declaration. Others use the same variable names in the calling function and in the declaration/prototype but a different one in the definition as in:
void blabla(int something); //prototype
blabla(something) // calling function inside main after something has been initialized to int
void blabla(int something_else) //definition
I have two questions:
What convention is best to use in C?;
Does the convention apply regardless whether a value is being passed "by-value" or if it's being passed by a pointer?
Thanks a lot...
© Stack Overflow or respective owner