Created
September 14, 2018 18:51
-
-
Save dibakarsutradhar/69e7a14682490847f8b6584a0b61d133 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
// global variables | |
int global = 10; | |
// main function | |
int main() { | |
// local variables with same name | |
int global = 5; | |
std::cout << "Value of Global Variable's global is: " << ::global << std::endl; | |
std::cout << "Value of Local Variable's global is: " << global << std::endl; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment