Static variable are those variable whose memory is shareable.
Static variable are declared once in entire life time of the program.
static data_type variable_name;
#include < iostream>
using namespace std;
static int a=10;
cout<< a<< endl;
-In this program, we call function() 2 times but we get different output because in second time line 1 is not executed.