/******************************************************************************
Online C++ Compiler.
Code, Compile, Run and Debug C++ program online.
Write your code in this editor and press "Run" button to compile and execute it.
*******************************************************************************/
#include <iostream>
#include <string>
#include <string.h>
using namespace std;
int main()
{
string s1 = "string";
const char* s2 = s1.c_str();
const char* s3 = s1.data();
char s4[20];
strcpy(s4, s1.c_str());
cout<<s1<<" "<<s1.size()<<" "<<sizeof(s1)<<endl;
cout<<s2<<" "<<strlen(s2)<<" "<<sizeof(s2)<<endl; // the size of a pointer
cout<<s3<<" "<<strlen(s3)<<" "<<sizeof(s3)<<endl; // the size of a pointer
cout<<s4<<" "<<strlen(s4)<<" "<<sizeof(s4)<<endl;
return 0;
}