Last active
April 5, 2016 05:06
-
-
Save re-imagined/ceada6a24cf6d5c6a1e4 to your computer and use it in GitHub Desktop.
Revisions
-
re-imagined revised this gist
Apr 5, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -5,7 +5,7 @@ char STR[] = "Hello\!"; ``` cout << sizeof(STR); ``` 的结果是7,**因为后面还有一个结束符 "\0"。** ``` for(int i = 0 ; i<=6; i++){ cout<<STR[i]; } -
re-imagined revised this gist
Apr 5, 2016 . 1 changed file with 9 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,13 @@ ``` char STR[] = "Hello\!"; ``` 有六个字符,但 ``` cout << sizeof(STR); ``` 的结果是7,_因为后面还有一个结束符 "\0"。_ ``` for(int i = 0 ; i<=6; i++){ cout<<STR[i]; } ``` 一样可以输出 Hello! -
re-imagined revised this gist
Apr 5, 2016 . 2 changed files with 7 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +0,0 @@ This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,7 @@ ```c char STR[] = "Hello\!"; 有六个字符,但 cout << sizeof(STR); 的结果是7,_因为后面还有一个结束符 "\0"。_ for(int i = 0 ; i<=6; i++){ cout<<STR[i]; } 一样可以输出 Hello! ``` -
re-imagined renamed this gist
Mar 27, 2016 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
re-imagined created this gist
Mar 27, 2016 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,5 @@ char STR[] = "Hello\!"; 有六个字符,但 cout << sizeof(STR); 的结果是7,因为后面还有一个结束符 "\0"。 for(int i = 0 ; i<=6; i++){ cout<<STR[i]; } 一样可以输出 Hello!