#include<stdio.h> void funstr(char *p) {*p=*p-32; while(*p!='\0') { if(*p==32) *(p+1)=*(p+1)-32; printf("%c",*(p++)); } } main() { char str[]="hello world:"; funstr(str); puts(str); }