I know that in C arrays should not have dynamic size.
With that in mind, is the following code valid? (Trying to declare an array of characters the same length as a double.)
char bytes[sizeof(double)];
I assume that it is sizeofworking on its argument at runtime, so this will not be allowed, but I'm not sure.
Also, will there be a difference if it is C ++ instead of C?
source
share