声明:该内容皆为原创,仅供业内人士相互学习交流经验,任何未经授权复制、转载、传播或使用本网站(或应用程序)内容的行为,将受到法律的制裁。如因侵权行为给本网站(或应用程序)或任何第三方造成损失的,侵权人应当承担相应的法律责任) 实现编译器:vs2022 编译器建议使用13、19、22等版本,相关语法与c++通用 源代码展示: #include<stdio.h> int main() { char str[100] = "ABCD EFGH\0"; char* p = str; char des[100], * q; while (*p != '\0') printf("%c", *p++); printf("\n"); while (--p >= str) printf("%c", *p); printf("\n"); p = str; q = des; while (*p != NULL) *q++ = *p++; *q = NULL; printf("%s\n", des); return 0; }