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 |
Input any no. and print all the the numbers that comes before it like this for e.g input = 4 0 01 012 0123 01234 plz answer it 2day
Why do we use static in c?
What is cohesion and coupling in c?
general for is %wd,f-d; in this system "w" means a) 'w' represent total width of digits b) 'w' represent width which includes the digits before,after decimal place and the decimal point c) 'w' represent width which includes the digits before only d) 'w' represent width after decimal place only
what is different between auto and local static? why should we use local static?
explain what is a newline escape sequence?
Explain why can’t constant values be used to define an array’s initial size?
what is bit rate & baud rate? plz give wave forms
What is the diffrent between while and do while statement ?
What is difference between function overloading and operator overloading?
write the function int countchtr(char string[],int ch);which returns the number of timesthe character ch appears in the string. for example the call countchtr("she lives in Newyork",'e') would return 3.
what is the output of below pgm? void main() { int i=0; if(i) printf("pass"); else printf("fail"); }