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 is a volatile keyword in c?
Can you write the function prototype, definition and mention the other requirements.
What is function what are the types of function?
What does c mean?
What is #define in c?
What is a class c rental property?
WHOT IS CHAR?
main() { unsigned int k = 987 , i = 0; char trans[10]; do { trans[i++] =(char) (k%16 > 9 ? k%16 - 10 + 'a' : '\0' ); } while(k /= 16); printf("%s\n", trans); }
What is the significance of c program algorithms?
Write a program to find whether the given number is prime or not?
What are the different categories of functions in c?
main() { int a[10]; printf("%d",*a+1-*a+3); }