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 / phani

No its invalid.A variable declared as static cannot be
changed though it is a global variable.

Is This Answer Correct ?    20 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the differences between Structures and Arrays?

595


How can this be legal c?

642


What is the condition that is applied with ?: Operator?

654


What are valid signatures for the Main function?

694


What are identifiers c?

557






How can I change the size of the dynamically allocated array?

621


Compare array data type to pointer data type

592


When should I declare a function?

613


void main(int n) { if(n==0) return; main(--n); printf("%d ",n); getch(); } how it work and what will be its output...............it any one know ans plz reply

2208


What is a program flowchart and how does it help in writing a program?

648


What is the time and space complexities of merge sort and when is it preferred over quick sort?

665


Are the expressions * ptr ++ and ++ * ptr same?

657


What is a scope resolution operator in c?

738


How many levels of indirection in pointers can you have in a single declaration?

587


the statement while(i) puts the entire logic in loop. this loop is called a) indefinite loop b) definite loop c) loop syntax wrong d) none of the above

597