用常量内存初始化字符数组 vs 用常量内存初始化字符串
#include<iostream>
#include<string.h>
using namespace std;
int main(){
char str1[]="hello world";
char str2[]="hello world";
cout<<&str1<<endl;
cout<<
博客探讨了使用常量内存初始化字符数组和字符串的区别,以及将指针赋值给常量字符串的运行结果分析。
用常量内存初始化字符数组 vs 用常量内存初始化字符串
#include<iostream>
#include<string.h>
using namespace std;
int main(){
char str1[]="hello world";
char str2[]="hello world";
cout<<&str1<<endl;
cout<<

被折叠的 条评论
为什么被折叠?