in one file global variable int i; is declared as static. In
another file it is extern int i=100;
Is this valid ?
Answers were Sorted based on User's Feedback
Answer / dipti
No its in valid as a static variable cannot be declared as extern.
The whole and entire purpose of static is to declare that a variable is private to the source file that it is declared in.
| Is This Answer Correct ? | 0 Yes | 0 No |
What are the parts of c program?
Explain what is the stack?
can u give me the good and very optimised code for a car racing game?
What is the use of the function in c?
A routine usually part of the operation system that loads a program into memory prior to execution a) linker b) loader c) preprocessor d) compiler
How are strings stored in c?
Why does everyone say not to use scanf? What should I use instead?
What is the size of enum in bytes?
Can an array be an Ivalue?
What are local variables c?
what is foreign key in c language?
What is enumerated data type in c?