Explore BrainMass
Share

Explore BrainMass

    Date Format Conversion Program in C/C++

    This content was COPIED from BrainMass.com - View the original, and get the already-completed solution here!

    Write a program that reads a date in the first format and prints the date in the second format.

    Example:
    Input: 07/21/1955
    Output: july 21, 1955

    © BrainMass Inc. brainmass.com October 9, 2019, 6:09 pm ad1c9bdddf
    https://brainmass.com/computer-science/pattern-matching/date-format-conversion-program-in-c-c-80133

    Solution Preview

    The idea is to print out string equivalent of the months and reformat the date as required. For this an array of ...

    Solution Summary

    The idea is to print out string equivalent of the months and reformat the date as required. For this an array of string is used as follows:
    char *m[]={"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"};

    Note, the index of this array starts from 0, so m[0] corresponds to "January" and m[11] corresponds to "December".
    The rest of the program is attached along with its executable in windows.

    $2.19