fork(1) download
  1. #include <stdio.h>
  2. #include <string.h>
  3.  
  4. int main(void) {
  5. int a;
  6. scanf("%d", &a);
  7. float f[2];
  8. memcpy(f, a ? (float[]){1.2, 3.4} : (float[]){5.6, 7.8}, sizeof(f));
  9. printf("%f %f\n", f[0], f[1]);
  10. return 0;
  11. }
  12.  
Success #stdin #stdout 0s 2252KB
stdin
1
stdout
1.200000 3.400000