Advertisement Remove all ads
Advertisement Remove all ads
Advertisement Remove all ads
Short Note
Explam Local Data and Global Data or variable in C++ using examples.
Advertisement Remove all ads
Solution
(1) Local data or variable is that data which comes inside the class.
(2) Global data or variable that data which comes outside the class.
(3) So, For accessing global data, the compiler requires a scope resolution operator.
(4) While in local data, scope resolution is not required.
(5) example:
int a ; //global data
void main()
{
int a; // local data
}
Concept: C++ Programming
Is there an error in this question or solution?