fork download
  1. #include <stdio.h>
  2.  
  3. typedef struct stFoo
  4. {
  5. int a;
  6. double b;
  7. } stFoo;
  8.  
  9. typedef struct stBar
  10. {
  11. int count;
  12. stFoo* p;
  13.  
  14. int x;
  15.  
  16. } stBar;
  17.  
  18. static stFoo arFoo[] =
  19. {
  20. {1,1.1},
  21. {2,2.2}
  22. };
  23.  
  24.  
  25. static const stBar barObj1 =
  26. {
  27. 2,
  28. arFoo,
  29. 42
  30. };
  31.  
  32. static const stBar barObj2 =
  33. {
  34. 2,
  35. arFoo,
  36. 43
  37. };
  38.  
  39. static stBar arBars[] =
  40. {
  41. barObj1,
  42. barObj2
  43. };
  44.  
  45.  
  46. int main(void) {
  47. // your code goes here
  48. return 0;
  49. }
  50.  
Success #stdin #stdout 0s 5264KB
stdin
Standard input is empty
stdout
Standard output is empty