Pages

Wednesday, 21 February 2018

Global Variable in C ++ Language

Global Variable in C ++ Language

#include <iostream>
using namespace std;
// This is a global variable
char myVar = 'A';
int main()
{
   cout <<"Value of myVar: "<< myVar<<endl;
   myVar='Z';
   cout <<"Value of myVar: "<< myVar;
   return 0;

}