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 correct code to have following output in c using nested for loop?
why do we use pointer instead directly acessing the data?
Is both getch() and getchar() functions are similar? if it is similar means why these two functions are used for same usage? if it is not similar means what is the difference?
Why is c so important?
What are data types in c language?
how can i write a program that prints out a box such that whenever i press any key8(coordinate number) on the keyboard, the box moves.
find largest of 3 no
What is the meaning of c in c language?
In C language, a variable name cannot contain?
What is output redirection?
List some applications of c programming language?
A marketing company wishes to construct a decision table to decide how to treat clients according to three characteristics: Gender, City Dweller, and age group: A (under 30), B (between 30 and 60), C (over 60). The company has four products (W, X, Y and Z) to test market. Product W will appeal to female city dwellers. Product X will appeal to young females. Product Y will appeal to Male middle aged shoppers who do not live in cities. Product Z will appeal to all but older females.