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 |
differentiate between const char *a; char *const a; and char const *a;
2 Answers College School Exams Tests, HCL, TCS,
how to reverse string "Hello World" by using pointers only. Without any temp var
main() { int i; for(i=0;i<5;i++) printf("%d",1l<<i); } why doesn't 'l' affect the code??????
the format specified for hexa decimal is a.%d b.%o c.%x d.%u
How we can set and clear bit in a byte using macro function?
can we implement multi-threads in c.
Explain what header files do I need in order to define the standard library functions I use?
What is the difference between ‘g’ and “g” in C?
What's the best way of making my program efficient?
What is volatile keyword in c?
What is c programming structure?
What does *p++ do? What does it point to?