scope resolution operator

Written by Pankaj . Posted in C & C++ on 03 March 2010.
Hot 1308 hits 0 favoured

q. WAP to implement the use of scope resolution operator

int number=100;
int main()
coute block\n";
int number=555;
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


Author: Pankaj

25 754 2
Love Is Life...... Love Is A Flame That's light Up The Soule.......
  • No comments found
Powered by CjBlog