rusi/test/offsetof.c

20 lines
413 B
C
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#включить "тест.з"
#включить "stdvv.c"
#include "common.c"
типдеф структ {
цел а;
символ б;
цел в;
двойн г;
} Т;
цел главн() {
ПРОВЕРИТЬ(0, offsetof(Т, а));
ПРОВЕРИТЬ(4, offsetof(Т, б));
ПРОВЕРИТЬ(8, offsetof(Т, в));
ПРОВЕРИТЬ(16, offsetof(Т, г));
printf("OK\n");
возврат 0;
}