fork(3) download
  1. #include <stdio.h>
  2.  
  3.  
  4. typedef struct record {
  5. int value;
  6. char *name;
  7. } record;
  8.  
  9.  
  10. int main (void) {
  11. record list[] = { (1, "one"), (2, "two"), (3, "three") };
  12. int n = sizeof(list) / sizeof(record);
  13.  
  14. printf("list's length: %i \n", n);
  15. return 0;
  16. }
  17.  
  18.  
Success #stdin #stdout 0s 2052KB
stdin
Standard input is empty
stdout
list's length: 2