What is diffrance between declaration and defination of a variable or function
Answers were Sorted based on User's Feedback
Answer / deepak mundhada
1 when we declare a variable it gets memory allocated at
stack in ram.
definition means we are assigning value to that variable.
2 address of variable can be changed but address cant be
changed.
Is This Answer Correct ? | 4 Yes | 0 No |
Answer / r.ramakrishna
Declaration means allocating memory for the variable.
Definition means defining address of the variable in a class.
Is This Answer Correct ? | 3 Yes | 1 No |
Answer / nagarjuna reddy
once a variable is defined it'l never change through entire
program.
but declaration of a variable can be changed as per our
requirement.
Is This Answer Correct ? | 3 Yes | 1 No |
Answer / manish soni bca 3rd year jaipu
IN FUNCTION;
-------------------------------------------
1:)DECLARE: int sum(int);//close with semicolon;
2:)DEFINATION: int sum(int n)//not colse with semicolon;
{
//logic of the function;
}
Is This Answer Correct ? | 2 Yes | 0 No |
Please write me a program to print the first 50 prime numbers (NOT between the range 1 -50)
Who had beaten up hooligan "CHAKULI" in his early college days?
If the size of int data type is two bytes, what is the range of signed int data type?
What is the purpose of macro in C language?
How to explain the final year project as a fresher please answer with sample project
can we declare a variable in different scopes with different data types? answer in detail
Why malloc is faster than calloc?
please give me a VIRTUSA sample palcement papers.... you will only send TECHNICAL SECTION..... that is help for me Advance Thanks........................
In c programming, explain how do you insert quote characters (? And ?) Into the output screen?
why do some people write if(0 == x) instead of if(x == 0)?
what is d pitfalls of registers variables
What is a #include preprocessor?