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

How do I convert a string to all upper or lower case?

629


How many identifiers are there in c?

581


what is ur strangth & weekness

1820


Can we change the value of static variable in c?

564


What is the size of array float a(10)?

657






which of the following is allowed in a "C" arithematic instruction a) [] b) {} c) () d) none of the above

1138


What is pointer to pointer in c with example?

549


what are non standard function in c

1436


How many types of arrays are there in c?

595


what is the basis for selection of arrays or pointers as data structure in a program

3788


What is wrong in this statement?

606


What are pragmas and what are they good for?

577


What is function and its example?

626


What header files do I need in order to define the standard library functions I use?

539


Is that possible to add pointers to each other?

903