Answer:
(B) A global variable can have the same name as a variable that is declared locally within a function.
Explanation:
The variables which are declared outside of all functions in the program are called global variables and variables that have scope limited to function or a block are called local variables.
For example:-
#include<iostream>
using namespace std;
int g=50;
int main()
{
int g=100;
cout<<"Local g= "<<g<<" Global g = "<<::g<<endl;//Use scope resolution operator to access global variables.
return 0;
}
Output:-
Local g= 100 Global g = 50.
In this code local g has value 100 and global g has value 50 and both the variables have same name.