It is the actual definition for the function 'square', which may or may not be declared previously.
Swathi Bhat said:
(Mon, Feb 14, 2011 09:37:45 AM)
What does double pow mean?
Sundar said:
(Sat, Feb 26, 2011 04:47:05 AM)
@Swathi Bhat
double pow(double, double);
It is a function prototype declaration. It should be defined somewhere in the program module. It denotes the following
1. Function name is 'pow'
2. It should called with 2 arguments of type 'double'
3. It will return a double value as result.
If you want to call the function then use the following method:
double Result;
Result = pow(5, 4);
Hope you can understand this. Have a nice day!
Aishu said:
(Mon, May 30, 2011 11:39:09 PM)
Can you tel me what is the difference between declaration and definition and state some examples?
Surya said:
(Sun, Jun 12, 2011 10:52:46 AM)
Nice explanation Sundar.
Jaz said:
(Mon, Aug 1, 2011 09:07:08 PM)
int a;
is the declaration, it simply assigns the datatype for the variable.
int a=10; is the definition, it assigns the value for the variable, the value given should match d datatype.
Vivek Patel said:
(Mon, Sep 19, 2011 08:25:44 PM)
Thanks to all for a good answers.
Ramarao Mundru said:
(Wed, Nov 9, 2011 07:41:43 AM)
Hi,
file f1.c
extern int a;//declaration because it doesn't allocate memory for a variable,it has allocated memory somewhere else in the program
file f2.c
int a;// it is definition because here it is getting memory
a=3;//it is assigment
Naveen Goud said:
(Wed, Jan 4, 2012 03:57:37 PM)
@aishu
A declaration is just writing a type of variable or function.
a definition is simply assigning a values to that particular variable or function.