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 |
Find errors (1) m = ++a*5; (2) a = b ++ -c*2; (3)y = sqrt (1000);
hi any body pls give me company name interview conduct "c" language only
Write a c program using for loop in switch case?
WRITE A PROGRAM TO MERGE TWO SORTED ARRAY USING MERGE SORT TECHNIQUE..
What is the right type to use for boolean values in c? Is there a standard type? Should I use #defines or enums for the true and false values?
What are the types of arrays in c?
what is the little endian and big endian?
Why is c called a structured programming language?
Why shouldn’t I start variable names with underscores?
What is your favorite subject?
1 Answers Ericsson, Invendis, Tech Mahindra,
What is the difference between #include and #include 'file' ?
DIFFERNCE BETWEEN THE C++ AND C LANGUAGE?