fork download
  1. #include <stdio.h>
  2.  
  3. typedef struct{int data[5];} takefive, *takefive_ptr;
  4.  
  5. int main() {
  6. int petuhi[] = {1, 2, 3, 4, 5};
  7. int krestuhi[5];
  8. *(takefive_ptr)&krestuhi = *(takefive_ptr)&petuhi;
  9.  
  10. for(int i = 0; i < 5; ++i) {
  11. printf("%d, ", krestuhi[i]);
  12. }
  13. return 0;
  14. }
  15.  
Success #stdin #stdout 0s 4508KB
stdin
Standard input is empty
stdout
1, 2, 3, 4, 5,