In C, we cannot access a global variable if we have a local variable with same name, but it is possible in C++ using scope resolution operator (::).
Please write comments if you find anything incorrect in the above GFact or you want to share more information about the topic discussed above.
- Redeclaration of global variable in C
- Internal static variable vs. External static variable with Examples in C
- How to print a variable name in C?
- Different ways to initialize a variable in C/C++
- How to modify a const variable in C?
- Variable Length Argument in C
- Why variable name does not start with numbers in C ?
- Using a variable as format specifier in C
- Variable Length Arrays in C and C++
- Variable length arguments for Macros
- How to Count Variable Numbers of Arguments in C?
- Different ways to declare variable as constant in C and C++
- C | Variable Declaration and Scope | Question 2
- C | Variable Declaration and Scope | Question 1
- C | Variable Declaration and Scope | Question 8