Storage classes (2) | GeeksforGeeks

preview_player
Показать описание
Find Complete Code at GeeksforGeeks Article:

This video is contributed by Vishal Gulia

Please Like, Comment and Share the Video among your friends.

Install our Android App:

If you wish, translate into local language and help us reach millions of other geeks:

Follow us on Facebook:

And Twitter:

Also, Subscribe if you haven't already! :)
Рекомендации по теме
Комментарии
Автор

I have some confusion in the last case you mentioned. From my understanding what "# include somefile.h " will do is basically paste the entire section of that header file there. So basically you will have definition and an extern decleration of the same variable in the same file right ? so .. do you really need extern in this scenario ?? .. kindly post if I am wrong.

akshayraveendran.k
Автор

In the 3rd case what will happen if we write
extern int var = 0;
...?
I think the memory will be given to the var variable and it will work fine?

mohitswain