#include <iostream>
#include <string>
using namespace std;
class CreateAndDestroy{
   private:
      int id;
      string s;           
   public:
      CreateAndDestroy() {
         cout<<"constructor is called"<<endl;    
      }       
      ~CreateAndDestroy(){
         cout<<"distructor is called"<<endl;                                     
      }
 }; 
 void create(){
      CreateAndDestroy c1, c2;
      system("pause");
 }
 main(){
      create();
      cout<<"In main"<<endl;
      CreateAndDestroy c3;
      system("pause");
 }
 
 
 
