## meow
```c++
#include <iostream>
using namespace std;
class GfG {
int i;
public:
GfG()
{
i = 0;
cout << "Inside Constructor\n";
}
~GfG() { cout << "Inside Destructor\n"; }
};
int main()
{
int x = 0;
if (x == 0) {
GfG obj;
}
cout << "End of main\n";
}
```
## Static
### Static in function
```c++
#include <iostream>
#include <string>
using namespace std;
void demo()
{
// static variable
static int count = 0;
cout << count << " ";
count++;
}
int main()
{
for (int i = 0; i < 5; i++)
demo();
return 0;
}
```
### Static variable in class
```c++
// C++ program to demonstrate static
// variables inside a class
#include <iostream>
using namespace std;
class GfG {
public:
static int i;
GfG(){
// Do nothing
};
};
int GfG::i = 1;
int main()
{
GfG obj;
// prints value of i
cout << obj.i;
}
```