ToUpperCase in C

void convertToUppercase(char *s){ while(*s!='\0'){ if(*s>='a' && *s<='z') *s -= 32; ++s; } }

2 Responses

Its dumping core in *s - = 32...pls take a look
Its getting core in *s -= 32, pls have a look

Write a comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.