怎末更改c语言中的字符串内容

问题遇到的现象和发生背景
问题相关代码,请勿粘贴截图
运行结果及报错内容
我的解答思路和尝试过的方法
我想要达到的结果
#include <stdio.h>
int main()
{
    int type = 0;
    printf("请输入标志:");
    scanf("%d",&type);
    char result [] = " ";
    switch (type)
    {
        case 0:
        result [] = "请输入符合条件的内容!";
        break;

        case 1:
        result [] = "January";
        break;

        case 2:
        result [] = "February";
        break;
    }
    return 0;
}

兄弟,我发现你没输出呀,给你改好了,你试试

#include <stdio.h>
#include <string.h>
int main()
{
    int type = 0;
    printf("请输入标志:");
    scanf("%d",&type);
    char result[20];
    switch (type)
    {
        case 0:
        strcpy(result,"请输入符合条件的内容\0");
        break;
 
        case 1:
        strcpy(result,"January\0");
        break;
 
        case 2:
        strcpy(result,"February\0");
        break;
    }
    printf("%s", result);
    return 0;
}

可以用C语言的<string.h>提供的strcpy函数进行拷贝,如下述代码,可以把scr的字符串拷贝给dest

#include <stdio.h>
#include <string.h>
int main(){
    char dest[50] = { 0 };
    char src[50] = { "http://c.biancheng.net" };
    strcpy(dest, src);
    puts(dest);
    return 0;
}

你的代码可以这样改:

case 0:
    strcpy(result, "请输入符合条件的内容!");
    break;
//另外两个同理