dhilst

Include 96 S 123 P S 32 Else P S P S P

up.c

#include <stdio.h>

char *up(const char *);

int main(){
const char *string;
string = "hello world";
printf("%s", up(string));
return(0);
}

char *up(const char *s){
char *p, *start;
void *malloc();
start = p = (char *)malloc(sizeof s);
while(*s != 0){
if(*s > 96 && *s < 123)
*p = *s - 32;
else
*p = *s;
p++; s++;
}
*++p = 0; /* end *p */
p = start;
return(p);
}




output:
HELLO WORLD