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
Where register variables are stored in c?
How do you determine a file’s attributes?
What is queue in c?
Can the curly brackets { } be used to enclose a single line of code?
What are the 32 keywords in c?
What is the acronym for ansi?
How can I find out how much free space is available on disk?
Do string constants represent numerical values?
What is the value of h?
With the help of using classes, write a program to add two numbers.
Is main an identifier in c?
Q.1 write a program to create binary tree 1 to 16 numbers? Q.2 write a program to creat a binary search tree for the member that is given by user?
What is the default value of local and global variables in c?
Explain how are 16- and 32-bit numbers stored?
What does #pragma once mean?