0

Why we write "sizeof" is that important

1/7/2020 8:08:27 PM

Thisari Kanchana

2 Answers

New Answer

+1

Size of is a method used with maps and arrays etc to find out the number of data contained in a map or an array. Eg Var a= [1,2,3,4,5,6]; alert(sizeof(a)); This outputs 5 Happy coding 😉 Keep coding 🙏🏾

0

Sizeof is a much used operator in C and C++. It is a compile time unary operator which can be used to compute the size of its operand. The result of sizeof is of unsigned integral type which is usually denoted by size_t. sizeof can be applied to any data-type, including primitive types such as integer and floating-point types, pointer types, or compound datatypes such as Structure, union etc. It's not a method, in C/C++, and it's not only used to determine the size of maps and arrays. That is of course assuming that you're talking about C/C++. A language tag would be helpful.