I have to write a function that takes an input such as this chevrolet, MALIBU and makes chevrolet into CHEVROLET and MAILIBU into Malibu I am having no trouble with capitalizing the CHEVROLET but when it comes time for the Malibu to be corrected it doesn't come out right.
directions if i wasnt clear: http://www.cs.niu.edu/~abyrnes/csci240/pgms/240pgm10.htm
Here is where I am at with the code:
void fixCarInfo (char *c)
{
while (*c != ',')
{
*c = toupper(*c);
c++;
}
while (*c == ',')
{
c++;
}
*c = toupper(*c);
c++;