it was told by our mentor in our class that int gives a variable 32 bits and char gives its variable 32 bits then why is the size of the operator is different when both are taking the same space of 32 bits
Size of an operator
@nimishkhattar07 Hey Nimish I think your mentor was talking about the pointer variable. Any pointer of any datatype (int*,float*,char*) reserves 4 byte memory in 32 bit memory System and in the 64 bit memory Machine pointer reserves 8 byte memory.
And size of primitive Data type is different.
int - 4 byte
char - 2 byte
Code Link : https://ide.codingblocks.com/s/81191
@nimishkhattar07 hey Nimish, if your query is resolved. Please mark this doubt as resolved and if you have any query then tell me, I am happy to help you out.