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 the = symbol and == symbol?
What is the main difference between calloc () and malloc ()?
WAP to accept basic salary of an employee? Calculate it HRA=25%,DA=30%,PF=30%&net salary display all contents?
6 Answers Finite Infotech, Lovely Professional University, Wipro,
Implement bit Array in C.
What is the difference between macros and inline functions?
Lists the benefits of c programming language?
What is the purpose of void in c?
int main(){ float f=8.0; if(f==8.0) printf("good"); else printf("bad"); } what is the answere and explain it?
can u give me the good and very optimised code for a car racing game?
2.main { int x,j,k; j=k=6;x=2; x=j*k; printf("%d", x);
Explain what is the most efficient way to store flag values?
What is queue in c?