No... the ordering in the memory layout is guaranteed by the Standard, although there can be padding between members too (always included in the sizeof
result, but that does mean hacky code like you've described may want to use an explicit pragma to pack data members or use offsetof to calculate the range of offsets to operate on, otherwise they may break on some other compiler / compiler-settings where the layout differs.
Separately, the layout of objects is identical regardless of where those objects are created: globals, stack, heap - it's always the same. Consider - offsetof is a compile time constant.