    #include <stdio.h>
    #include <string.h>
    #include <stdlib.h>

    int main(void){
        char *ptr = malloc(6);
        const char *name = "MICHI";
        unsigned int i = 0;

        if(ptr){
            strcpy(ptr, name);
            ptr[strlen(ptr)] = '\0';
        }else{
            return 1;
        }

        while(ptr[i] != '\0'){
            if((ptr[i] >= 'A') && (ptr[i] <= 'Z')){
                ptr[i] += (unsigned char)32;
            }
            i++;
        }

        printf("Name = %s\n",ptr);
        if(ptr){
            free(ptr);
            ptr = NULL;
        }
    }