9
Besides the point Billy mentioned, alloca is non-standard (it's not even in C99).
Besides the already-discussed points of when exactly the space is freed, and whether the construct is supported at all, there is also this:
alloca case, bytes has a pointer type.[] case, bytes has an array type.The most noticeable difference is in what sizeof(bytes) is; for a pointer it is the size of the pointer (sizeof(void *)) whereas for an array it is the size of the allocated space (sizeof(char) * size, which = size for this case since sizeof(char) = 1).
(Also, in your example, the element types are different; to be the same, the first should be changed to char *bytes = alloca(size).)