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 |
What is the difference between declaring a variable and defining a variable?
Why do we need volatile in c?
What is that continue statement??
what is data structure?
main() { int i; printf("%d", &i)+1; scanf("%d", i)-1; }
Multiply an Integer Number by 2 Without Using Multiplication Operator
Why is c fast?
Write a program in C to reverse a number by recursive function?
What is difference between the following 2 lines…. int temp = (int)(0x00); int temp = (0x00int);
Write a routine that prints out a 2-D array in spiral order!
difference between i++* and *++i
what is the difference between arrays and linked list
26 Answers MAHINDRA, Tech Mahindra, Wipro,