0 votes
in C Plus Plus by

What is the purpose of the Extern Storage Specifier?

1 Answer

0 votes
by

“Extern” specifier is used to resolve the scope of a global symbol.

#include <iostream >

 using nam espace std;

 main()

 {

extern int i;

 cout<<i<<endl;

 }

 int i=20;

In the above code, “i” can be visible outside the file where it is defined.

Related questions

+2 votes
asked Jun 19, 2019 in C Plus Plus by anonymous
+2 votes
0 votes
asked Nov 19, 2023 in C Plus Plus by GeorgeBell
...