Popular Articles

During the terrific silence of that horrible night, they could not hear the footsteps of death. On the eighteenth night of a great war, they were sleeping
“Bottle, bottle everywhere; not a single one to provide water” Bottled water is the present era acquisition of safe drinking water to homes and offices
Beauty of Kashmir is breathtaking and thus this valley is rightly described as paradise on earth. Carpets of saffron resembling lotus petals are spread

Latest Articles

Beauty of Kashmir is breathtaking and thus this valley is rightly described as paradise on earth. Carpets of saffron resembling lotus petals are spread
Located in culturally important Bhavnagar district of Gujarat, Alang today is known worldwide for ship dismantling. It is world's largest ship dismantling
Our ancestors discovered the technique of cooking food. Earlier they used to consume food in its original state i,e., in its raw form, regardless of whether

q. WAP to implement the use of scope resolution operator

#include
#include
int number=100;
int main()
{clrscr();
coute block\n";
int number=555;
couter;
}
coutin";
cout"numberumber=";
getch();
return 0;
}



output of the program:
in main
inside block
number=555 ::number=555
back in main
number=234 ::number=234

Description about program:

in the above programe firstly we declared globally number to100. Then in the main fuction we firstly define that we are in main then define an integer type number =243 . then inside an another block we again define an integer type number=555. Then if we simply write cout number in side that block it show an output number=555. outside the block if we write cout