int a; is Definition and Declaration both ? or declaration only ?
sourabhtripathi -10 Newbie Poster
Recommended Answers
Jump to Post
int a;
is a declaration as well as definition. This c statement not only says the type of the variable but also allocates the memory required for this variable.
Jump to Post@0x69:
What I understood was that you state that the following isn't a definition:int *p;
.http://web.archive.org/web/20050207005628/http://dev.unicals.com/papers/c89-draft.html#1.6:
"Object --- a region of data storage in the execution environment, the contents of which can represent values. Except for bit-fields, objects are …
All 7 Replies
super-sonic 1 Newbie Poster
sourabhtripathi -10 Newbie Poster
0x69 41 Junior Poster
sourabhtripathi -10 Newbie Poster
0x69 41 Junior Poster
tux4life 2,072 Postaholic
0x69 41 Junior Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.