diff options
Diffstat (limited to 'tests/tst_sizeof.c')
| -rwxr-xr-x | tests/tst_sizeof.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/tst_sizeof.c b/tests/tst_sizeof.c new file mode 100755 index 0000000..46ce2cf --- /dev/null +++ b/tests/tst_sizeof.c @@ -0,0 +1,16 @@ +#include <stdio.h> + +char str[]={'A',}; +int i[]={1,2,3}; + +struct tsr +{ +int len; +char s[256]; +} t = {sizeof(str),"string"}; + +int main() +{ +printf("sizeof str: %u i:%u\n",sizeof("string"),sizeof(i)); +return 0; +} |
