Implementing a -Ver option

Learn how to implement the -Ver option.

You can write a program to display the information stored in the version_string and version_time variables. An example of such a program follows:

#include <stdio.h>

main(argc,argv)
    int argc;
    char **argv;
{
/*
 * implement -Ver option
 */
    if (argc > 1 && strcmp(argv[1],"-Ver") == 0) {
        char *version_string = "monet R2.0 Baselevel 1";
        char *version_time= "Thu Feb 11 17:33:23 EST 2003";
        /*
         * Print version info
         */
        printf ("%s (%s)\n",
                    version_string, version_time);
        exit(0);
    }
}