What is scope resolution operator, C/C++ Programming

Scope Resolution operator:

The scope resolution operator: : is used to access global variable in the inner block. When global and local variable are identical name the scope resolution operator will help to access the global variable in the inner block.   This cannot be done in C programming.   This operator will read only the global variable.

 

int x=10;

int main()

{clrscr();

int x=100;

{

int x=1000;

cout<<"\n"<

}

cout<<"\n"<

return 0;

}

 

Posted Date: 9/20/2012 7:36:27 AM | Location : United States







Related Discussions:- What is scope resolution operator, Assignment Help, Ask Question on What is scope resolution operator, Get Answer, Expert's Help, What is scope resolution operator Discussions

Write discussion on What is scope resolution operator
Your posts are moderated
Related Questions
Explain Object-oriented programming Object-oriented programming (OOP) attempts to meet these requirements, providing methods for managing enormous complexity, achieving reuse o

Project Description: I am trading binary options and need my signals that are sent to me via email to be sent to my followers via an RSS feed I have no idea how rss feeds imp

Can I drop the [] while deleteing array of some built-in type (char, int, etc)? A: No. you can't Sometimes programmers think that the [] in the delete[] p only present so the



Explain a class to model a banking system. The function members should allow initializing the data members, a query to facilitate for account and a facility to deposit and with

Program is to define a class as student: Program is to define a class as student and display the records specific depending upon the number class student  {  private:

Program to draw a circle: int main(void) {    /* request auto detection */    int gdriver = DETECT, gmode, errorcode;    int midx, midy;    int radius = 100;

Write a program to compute the following equation for values of time.           y = 2x+3   The values of time are stored in the file program.dat and the solution should be display

program to find if a no . is prime or not