Time Conversion

  • + 0 comments

    CAN YOU PLEASE EXPLAIN THE BELOW CODE: char plus12 = n_hour >= 12; n_hour += time[8] == 'P' ? (plus12 ? 0 : 12) : (plus12 ? -12 : 0); printf("%02d:%.*s:%.*s", n_hour, 2, time + 3, 2, time + 6);