44问答网
所有问题
c语言怎么重新输入一个字符串
如题所述
举报该问题
推荐答案 2024-12-07
在c语言中存储一个字符串,一般有两种方法,一种是字符指针,一种是使用字符数组。比如:
const char *str = hello; //使用字符串指针
const char str[] = hello; //使用字符数组
如果保存的字符串,需要修改。一般使用字符数组。比如:
char path[256] = c:\\windows\\;
strcat(path, system32)
温馨提示:答案为网友推荐,仅供参考
当前网址:
http://44.wendadaohang.com/zd/GZKRVDDKZ6VZDKYW3KK.html
相似回答
大家正在搜