Advertisement
Mysoft

Untitled

Mar 24th, 2016
632
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.29 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. struct Struct1 {
  4.     char x;
  5.     int y;
  6. }  __attribute__ ((aligned (16)));
  7.  
  8. struct Struct1 tCheck;
  9.  
  10. int main()
  11. {
  12.    
  13.     printf( "Alignment = %i\r\n",  sizeof(tCheck)  );
  14.  
  15.     return 0;
  16. }
  17.  
  18. // G:\mingw>bin\gcc.exe align.c -o align.exe
  19. // G:\mingw>align
  20. // Alignment = 16
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement