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 / vadivel t

No. it is not valid,

Bcos we can not initialise a variable with an extern key
word.ie.,

The statement extern int i = 100; is wrong.

Is This Answer Correct ?    14 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain what is the difference between far and near ?

647


Is fortran still used in 2018?

588


Explain what is the heap?

618


explain how do you use macro?

665


What is a pointer in c?

677






What is the easiest sorting method to use?

632


Describe explain how arrays can be passed to a user defined function

597


Why do we use header files in c?

573


What does c value mean?

618


What are predefined functions in c?

560


What is a lookup table in c?

622


can anyone please tell about the nested interrupts?

1674


How are structure passing and returning implemented?

588


Function calling procedures? and their differences? Why should one go for Call by Reference?

629


Is it possible to execute code even after the program exits the main() function?

807