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

write a recursive program in'c'to find whether a given five digit number is a palindrome or not

2 Answers  


how to create duplicate link list using C???

0 Answers  


regarding the scope of the varibles;identify the incorrect statement: a.automatic variables are automatically initialised to 0 b.static variables are are automatically initialised to 0 c.the address of a register variable is not accessiable d.static variables cannot be initialised with any expression

1 Answers   TCS,


How can I implement opaque (abstract) data types in C? What's the difference between these two declarations? struct x1 { ... }; typedef struct { ... } x2;

2 Answers  


What is the difference between a string and an array?

0 Answers  






What is the function of volatile in c language?

0 Answers  


Program to find the sum of digits of a given number until the sum becomes a single digit

8 Answers   InterGraph,


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

1 Answers  


What is the importance of c in your views?

0 Answers  


A character flag or control mechanism that delineates one data item from another a) variable b) constant c) delimiter d) call by reference

0 Answers  


Explain modulus operator.

0 Answers  


write a program to print calender using for loop.

1 Answers   HCL, TCS,


Categories