fork download
  1. #include <stdio.h>
  2.  
  3. typedef struct Date Date;
  4.  
  5. void printDate(Date *pDate);
  6.  
  7. typedef struct Date {
  8. int year, month, day;
  9. } Date;
  10.  
  11. void printDate(Date *pDate)
  12. {
  13. printf("%04d/%02d/%02d", pDate->year, pDate->month, pDate->day);
  14. }
  15. int main(void)
  16. {
  17. Date date = { 2018, 9, 3 };
  18. printDate(&date);
  19. return 0;
  20. }
  21.  
Success #stdin #stdout 0s 9424KB
stdin
Standard input is empty
stdout
2018/09/03