fork(1) download
  1. #include <stdio.h>
  2.  
  3. int i = 0;
  4.  
  5. int f() {
  6. return ++i;
  7. }
  8.  
  9. int g() {
  10. i += 2;
  11. return i;
  12. }
  13.  
  14. int h() {
  15. i += 4;
  16. return i;
  17. }
  18.  
  19. typedef struct {
  20. int c;
  21. char a;
  22. float b;
  23. } X;
  24.  
  25. int main(void) {
  26. X foo = {.a = (char)f(), .b = g(), .c = h()};
  27.  
  28. printf("c = %d\na = %hhu\nb = %f", foo.c, foo.a, foo.b);
  29.  
  30. return 0;
  31. }
  32.  
Success #stdin #stdout 0s 2160KB
stdin
Standard input is empty
stdout
c = 4
a = 5
b = 7.000000