Hi again,
Can anyone tell me how the sizeof() function works.
thanks.
sizeof()
Re:sizeof()
sizeof is not a function but an operator implemented directly by the
compiler itself, it doesn't belong to your program and is like a
reserved keyword.
At compile time each sizeof() is evaluated (accordingly) and then replaced
by its value.
The compiler knows the sizes of its data types, so it is trivial to translate the
data type to its type-size.
compiler itself, it doesn't belong to your program and is like a
reserved keyword.
At compile time each sizeof() is evaluated (accordingly) and then replaced
by its value.
The compiler knows the sizes of its data types, so it is trivial to translate the
data type to its type-size.
Re:sizeof()
Sorry for posting here then, but I thought that it was part of libc, which is directly related to programming an OS based upon the C language. However if people think it to be off topic then I will not post anymore C questions here.
Sorry, and thanks for you answer anyway.
Sorry, and thanks for you answer anyway.