//013H
#include "stdio.h"

void str_space_replace(const char* src,  char* dst)
{
    for (char ch; ch = *src; ++src){
        if (' ' == ch){
            *dst++ = '%';
            *dst++ = '2';
            *dst++ = '0';
        }
        else{
            *dst++ = ch;
        }
    }
    *dst = '\0';
}

int _tmain(int argc, _TCHAR* argv[])
{
    const char* src = "Happy birthday to you!";
    char dst[100];
    printf("输入字符串 = %s\n", src);
    str_space_replace(src, dst);
    printf("输出字符串 = %s\n", dst);
    return 0;
}