+ 1
What is the use of "sizeof()" operator in c++
When is it used?
3 Respuestas
+ 5
sizeof() operator is used to know the size of data type.
Example:
int a;
sizeof(a);
Here after printing, output will be 4, because size of int data type is 4 bytes. Similarly size of float is 8 bytes, double is 16 bytes and so on.
Hope you will understand.
+ 1
Thanks didi
+ 1
I understood