+ 1

What is the use of "sizeof()" operator in c++

When is it used?

20th Nov 2020, 4:02 AM
ç±łćžŒć°”
ç±łćžŒć°” - avatar
4 Answers
+ 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.
20th Nov 2020, 4:14 AM
ツSampriya😘ツ
ツSampriya😘ツ - avatar
+ 1
Thanks didi
20th Nov 2020, 4:16 AM
ç±łćžŒć°”
ç±łćžŒć°” - avatar
+ 1
I understood
20th Nov 2020, 4:16 AM
ç±łćžŒć°”
ç±łćžŒć°” - avatar