Computer Science, asked by Kaushal7786, 10 months ago

What is tha difference in declearing global variable and extern?

Answers

Answered by MohammedLatheefAhmed
1

A global variable is variable, which is accessible from anywhere in the file you defined it in. An extern variable is a global variable which is accessible in other files too.... In order to do this, variable must be declared in both files, but the keywords extern must precede the "second" declaration.

I hope this is helpful to you

plz mark me as brainliest.

Answered by Anonymous
2

A global variable is variable, which is accessible from anywhere in the file you defined it in. An extern variable is a also a global variable which is accessible in other files too. ... In order to do this, the variable must be declared in both files, but the keyword extern must precede the "second" declaration.

Similar questions