KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I read from a book about tentative defination that, A tentative definition is any external data declaration that has no storage class specifier and no initializer. A tentative definition becomes a full definition if the end of the translation unit is reached and no definition has appeared with an initializer for the identifier Please explain what the above statement means. Also, the difference between Declaration and Definition? I got mixed up due to this. :( And why doesn't this program give an error: #include <stdio.h> int a; //Tentative definition int a; //similarly this declaration too. int main() //not getting any error with this code why its so? { printf("hi"); } Also, what is wrong with this code: #include<stdio.h> printf("Hi"); int main(void){ return 0; }
Tags (comma-separated)
Save Edits
Cancel