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

No its in valid as a static variable cannot be declared as extern.
The whole and entire purpose of static is to declare that a variable is private to the source file that it is declared in.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Linked list is a Linear or non linear explain if linear how it working as a non linear data structures

1767


Is exit(status) truly equivalent to returning the same status from main?

589


hi, which software companys will take,if d candidate's % is jst 55%?

1669


What is the difference between abs() and fabs() functions?

611


Write the test cases for checking a variable having value in range -10.0 to +10.0?

1822






Which is better between malloc and calloc?

673


In c programming, explain how do you insert quote characters (? And ?) Into the output screen?

768


What is a stream?

655


Explain the difference between strcpy() and memcpy() function?

599


How can I direct output to the printer?

820


Why is c still so popular?

620


what is uses of .net

1279


A collection of functions,calls,subroutines or other data a) library b) header files c) set of files d) textfiles

651


What is the difference between strcpy() and memcpy() function in c programming?

630


‘ C’ PROGRAME TO SHOW THE TYPE OF TRANGLE BY ACCEPTING IT’S LENGTH .

2378