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
Unary Minus Operator( Negation) This operand can be used to negate the value of a variable. It is also used to state a negative number, here a minus(-) sign is prefixed to the

Just need the answers to the following 3 questions. "NO NEED to write a program compile or run it, do not need it. Just need the answers for the following questions. Example quest

: Write a program that prompts the user to enter five digit positive numbers. The program then outputs the digits of the number one digit per line. Eg if the user enters 32456, th

C Program to FIND VOWELS AND REMOVE VOWELS void main() {           char s[100],s1[100];           int i,j,k=0;           clrscr();           printf("ENTER ANY S

Given an integer n and a permutation of numbers 1, 2 ... , n-1, n write a program to print the permutation that lexicographically precedes the given input permutation. If the given

Write a program to find the area under the curve y = f(x) between x = a and x = b, integrate y = f(x) between the limits of a and b.

Write a program to find the area under the curve y = f(x) between x = a and x = b, integrate y = f(x) between the limits of a and b. The area under a curve between two points can b

Write three functions in C or C++: one that declares a large array statically, one that declares the same large array on the stack, and one that creates the same large array from t

What are all of the implicit member functions of the class? Or what are all of the functions that compiler implements for us if we don't describe one? A: 1.      copy ctor

Implement (a part of) electronic election Scenario where following political parties are participating in election: PPP, PML and PTI.  Create a class PollingStation where it stor