------------- operator resolves ambiguity between local & global variables.
a) - b) :: c)? d):
Answers
Answered by
3
Answer:
This is my code #include <iostream> using namespace std; int x = 5; int main() { int x = 1; cout << "The variable x: " << x << endl; } I get as output ...
Missing: d | Must include: d
Answered by
1
Answer:
The answer would be the option (b) ::
Explanation:
The symbol '::' is known as the scope resolution operator. It is used for the following purposes.
- To access a global variable if you have a local variable with the same name.
- For defining the function outside the class.
- For accessing static variables in the class.
- For multiple inheritance: If the same variable name exists in two ancestor classes, you can distinguish it using the scope resolution operator.
#SPJ3
Similar questions
Environmental Sciences,
5 months ago
Computer Science,
5 months ago
Psychology,
5 months ago
Science,
10 months ago
English,
10 months ago
Math,
1 year ago