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

What is size of union in c?

752


Why do we use int main?

830


What is an auto variable in c?

954


What is the difference between formatted&unformatted i/o functions?

813


Describe the header file and its usage in c programming?

814


What is header file in c?

827


List the difference between a "copy constructor" and a "assignment operator"?

766


What are the advantages and disadvantages of c language?

761


What functions are in conio h?

879


What is ambagious result in C? explain with an example.

2297


Why is c used in embedded systems?

840


A collection of data with a given structure for excepting storing and providing on demand data for multiple users a) linked list b) datastructer c) database d) preprocessor

844


What is difference between Structure and Unions?

866


What is the difference between array and pointer?

765


Why calloc is better than malloc?

782