C program Wild Kimlin

#include
#include

void convertToUppercase(char*sPtr);

int main(void)
{
char string[]="ho kim lin is wild!";
printf("The string before conversion is:%s", string);
convertToUppercase(string);
printf("\nThe string after conversion is :%s\n", string);
system ("pause");
return 0;
}

void convertToUppercase(char*sPtr)
{
while(*sPtr!='\0'){
if(islower(*sPtr)){
*sPtr=toupper(*sPtr);
}
++sPtr;
}
}




compilation result











Comments

Popular posts from this blog

上帝也剥夺不了的东西

三年后的我不住高楼

蓝色 星期一