Logo 
Search:

C++ Programming Articles

Submit Article
Home » Articles » C++ Programming » Homework HelpRSS Feeds

Program that provides an example of scope resolution operator

Posted By: Matthew Evans     Category: C++ Programming     Views: 10455

Write a program that provides an example of scope resolution operator.

Code for Program that provides an example of scope resolution operator in C++ Programming

#include<iostream.h>
int i=10;
main()
{
    int i=5;
    cout<<"local i= "<<i<<endl;
    cout<<"Global i= "<<::i<<endl;
}
  
Share: 



Matthew Evans
Matthew Evans author of Program that provides an example of scope resolution operator is from London, United Kingdom.
 
View All Articles

 

Other Interesting Articles in C++ Programming:


 
Please enter your Comment

  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].

 
No Comment Found, Be the First to post comment!