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

variable/function defined static make the scope limited to
only the file in which it is defined and cannot be accessed
outside the file. Hence it is invalid

Is This Answer Correct ?    6 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why do we use null pointer?

597


Explain what is the benefit of using const for declaring constants?

604


Write a program for finding factorial of a number.

623


What are the different properties of variable number of arguments?

657


What is the difference between near, far and huge pointers?

624






What is the difference between struct and typedef struct in c?

640


What is meant by int main ()?

712


How do you initialize pointer variables?

598


Is it better to use a pointer to navigate an array of values, or is it better to use a subscripted array name?

646


What is else if ladder?

603


How can I call system when parameters (filenames, etc.) Of the executed command arent known until run time?

581


What is define c?

564


How to compare array with pointer in c?

610


Who invented bcpl language?

698


Define VARIABLE?

682