in one file global variable int i; is declared as static. In
another file it is extern int i=100;
Is this valid ?
Answer Posted / 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 |
Post New Answer View All Answers
What is the importance of c in your views?
How to get string length of given string in c?
How can I avoid the abort, retry, fail messages?
Explain what is the difference between the expression '++a' and 'a++'?
What is a const pointer?
Study the following C program :call_me (myvar)int myvar;{ myvar +- 5; }main(){int myvar;myvar = 3;call_me(myvar);printf("%d ",myvar);What will be printed a) 3 b) 5 c) 8 d) symbol
What is an operator?
What does c in a circle mean?
What is hungarian notation? Is it worthwhile?
When is a void pointer used?
What is pivot in c?
What is external variable in c?
What is main () in c?
what do you mean by enumeration constant?
How do you do dynamic memory allocation in C applications?