0
Please I want to write a sample program that will demonstrate different scope of variable
Explain how the program will be executed by the computer
6 Respuestas
+ 2
try this
1. define global variable a=100.
2. define local variable a= 50 in main
3. use same variable name in another function outside main a= 10
4. print all those with and without scope resolution operator ::
+ 1
int a=200;
void display(int a){
a = 10;
cout << a << ::a;
}
main(){
int a = 50;
void display(a);
cout << a <<::a;
}
output 10 200 50 200
0
Please how do I go about it
Can u please write the code for me
Pls
0
Pls I need the program
0
Thanks so much Mr dipak for the answer
0
The program is not running, it flag error
Please can u help me out with the full code