fork(3) download
  1. #include <stdio.h>
  2.  
  3. struct starship {
  4. char * name;
  5. char * type;
  6. int numphasers;
  7. int numphotontorps;
  8. int crewsize;
  9. };
  10.  
  11. int main (int argc, char * args[]) {
  12. const struct starship enterprise = {"Enterprise D", "NCC 1701", 5, 25, 428 };
  13. printf("Ship's name is %s",enterprise.name);
  14. return 0;
  15. }
Success #stdin #stdout 0.01s 10176KB
stdin
Standard input is empty
stdout
Ship's name is Enterprise D