ahmed0saber

Global Variables in C++

Nov 5th, 2020
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.14 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3. int a=5;
  4. void function()
  5. {
  6.     cout<<a*a<<endl;
  7. }
  8. int main()
  9. {
  10.     cout<<a<<endl;
  11.     function();
  12. }
Advertisement
Add Comment
Please, Sign In to add comment