关于数组及字符数组
char ch[] = "abc";与char ch[] = {'a','b','c','\0'};的区别?char *ch = "abc";与char ch[] = "abc";的区别?
int ia[] = {1,2,3};cout<<ia;输出的是ia的地址,而char ch[] = {'a','b','c','\0'};cout<<ch;却是"abc",why?
如果char ch[] = "abc";与char ch[] = {'a','b','c','\0'};没有'\0'的话,cout<<ch;输出的结果却不可想像,why?
请大家指教