/* Uplow.c (c) Kari Laitinen http://www.naturalprogramming.com/ 2013-11-28 File created. 2013-11-28 Last modification. */ #include void convert_string_uppercase( char given_string[] ) { int character_index = 0 ; while ( given_string[ character_index ] != 0 ) { if ( given_string[ character_index ] >= 'a' && given_string[ character_index ] <= 'z' ) { given_string[ character_index ] = given_string[ character_index ] & 0xDF ; } character_index ++ ; } } int main() { char test_string[] = "Dennis Ritchie is the father of C." ; printf( "\n String before conversion: %s", test_string ) ; convert_string_uppercase( test_string ) ; printf( "\n String after conversion: %s\n", test_string ) ; }