tolower function in C

From: Ahsan (ali_boyz_at_hotmail.com)
Date: 05/08/04


Date: 8 May 2004 07:15:17 -0700

Hi All,
I am having prolems with converting upper case characters to lower
case in Unix's C. I saw the man pages and "tolower" function does it.
But in my case its not working.
My code is as follows:
============================================================
gets ( input );
sscanf(input, "%s", Cmd);
                
for( p = 0; p < strlen( Cmd ); p++ )/* Changing all input to lower
characters */
{
        printf("hello in loop");
        if( isupper( Cmd[p] ) )
        {
                _tolower( Cmd[p] );
                printf("%c", Cmd[p]);
        }
}
=============================================================

Anxiously Waiting for reply,
Regards,



Relevant Pages