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
Is there any data type in c with variable size?
Can variables be declared anywhere in c?
Can i use “int” data type to store the value 32768? Why?
Explain how do you use a pointer to a function?
Is javascript based on c?
Explain how do you view the path?
State the difference between x3 and x[3].
what are the program that using a two dimensional array that list the odd numbers and even numbers separately in a given 10 inputs values
Explain about C function prototype?
c language supports bitwise operations, why a) 'c' language is system oriented b) 'c' language is problem oriented c) 'c' language is middle level language d) all the above
What is cohesion and coupling in c?
What are the preprocessor categories?
Explain how do I determine whether a character is numeric, alphabetic, and so on?
how to find binary of number?
Why string is used in c?