what is the difference between definition and declaration?
give me some examples.

Answers were Sorted based on User's Feedback



what is the difference between definition and declaration? give me some examples...

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

what is the difference between definition and declaration? give me some examples...

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

Post New Answer

More C Interview Questions

What is the difference between declaring a variable and defining a variable?

0 Answers  


Why do we need volatile in c?

0 Answers  


What is that continue statement??

4 Answers  


what is data structure?

5 Answers   CBSE,


main() { int i; printf("%d", &i)+1; scanf("%d", i)-1; }

1 Answers  






Multiply an Integer Number by 2 Without Using Multiplication Operator

0 Answers  


Why is c fast?

0 Answers  


Write a program in C to reverse a number by recursive function?

1 Answers  


What is difference between the following 2 lines…. int temp = (int)(0x00); int temp = (0x00int);

3 Answers   Bosch,


Write a routine that prints out a 2-D array in spiral order!

1 Answers   Lucent,


difference between i++* and *++i

6 Answers   IBM,


what is the difference between arrays and linked list

26 Answers   MAHINDRA, Tech Mahindra, Wipro,


Categories