output: size is 1Code:#include <iostream> using namespace std; class A{ }; int main(){ A a; int x=sizeof(a); cout << "size is "<<x<<endl; return 0; }
and if i modify it to A *a then the size is 8
what could be the reason? any reply is appreciated