D
dwaach
Hi,
In the following program,
#include <iostream>
using namespace std;
class A
{
public:
string name;
char address[256];
};
int main()
{
A oa;
cout<<sizeof(oa.name)<<endl;
cout<<sizeof(oa.address)<<endl;
return 0;
}
Output is,
28
256
Why is string size as 28.
???
Thanks
Abhi
In the following program,
#include <iostream>
using namespace std;
class A
{
public:
string name;
char address[256];
};
int main()
{
A oa;
cout<<sizeof(oa.name)<<endl;
cout<<sizeof(oa.address)<<endl;
return 0;
}
Output is,
28
256
Why is string size as 28.
???
Thanks
Abhi