+ 6
What is size of void , null , undefined ?
6 odpowiedzi
+ 2
If this is c a void pointer can point to any type, but we don't know the type and therefore the size, this has a size of 1 by default. Any function that uses a void pointer should also have the size of the type as a variable, so the function can use the true size. You cannot look up the qsort prototype as an example. This can be used in c++, but templates provide a safer way to write generic functions.
+ 6
Void indicates that function hasn’t return.
+ 5
Size ? In wich language ?
+ 5
Void is a type of a function, it hasn’t value ( no size ). Null and undifined , same.
+ 5
then why sizeof(void) gives 1 byte
+ 3
any