Is it true that a global variable may have several declarations, but only one definition?
Answers
Answered by
0
Answer:
possibly not.
Explanation:
Basically, declaration means declaring the data type of the variable i.e., which type of data is to be stored in that variable.
When you declare the variable, the memory space is assigned to that variable depending on the data type.
Public, private, protected are the access specifiers i.e., if the variable is global(public) then it is declared once but, it can be defined multiple times i.e., the data in it can be changed according to the requirement
Similar questions