what is the difference between definition and declaration?
give me some examples.
Answers were Sorted based on User's Feedback
Answer / mohammed anas
declaration:
for example,int i;
definition:
declaration as well as initialisation is known as definition
for example int i=25;
| Is This Answer Correct ? | 7 Yes | 0 No |
Answer / code00002
A declaration introduces an identifier and describes its
type, be it a type, object, or function. A declaration is
what the compiler needs to accept references to that
identifier. These are declarations:
extern int bar;
extern int g(int, int);
double f(int, double); // extern can be omitted for function
declarations
class foo; // no extern allowed for class declarations
complete on http://answerwale.co.cc/?p=39#comment-23
| Is This Answer Correct ? | 2 Yes | 3 No |
Can we declare variables anywhere in c?
wt is diference between int and int pointer as same as float and float pointer and char and char pointer
hOW Can I add character in to pointer array of characters char *a="indian"; ie I want to add google after indian in the char *a
char S; char S[6]= " HELLO"; printf("%s ",S[6]); output of the above program ? (0, ASCII 0, I,unpredictable)
In how much time you will write this c program? Prime nos from 1 to 1000
wat is output of the following int main() { const int j=2; int i; switch(i) { case 1:break; case j:break; default:break; } }
Is file a keyword in c?
int x=sizeof(!5.856); What will value of variable x?
How can I write a function that takes a format string and a variable number of arguments?
Is there any restriction in how many arguments printf or scanf function can take? in which file in my c++ compiler i can see the code for implementation of these two functions??
Subtract Two Number Without Using Subtraction Operator
swapping of two numbers without using third variable using AND and OR operators