File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Chapter 2:Types, Operators and Expressions/2.4 Declaration - const 9-0-5 Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -80,9 +80,7 @@ int string_length_2_(const char(*parameter)[5]) {
8080 return counter ;
8181}
8282
83- // "When an array name is passed to a function, the function can at its convenience believe that
84- // it has been handed either an array or a pointer, and manipulate it accordingly.
85- // It can even use both notations if it seems appropriate and clear."[1]:114
83+
8684int string_length_3_ (char parameter [][5 ]) {
8785
8886 char * character = parameter ;
@@ -116,6 +114,10 @@ int* count_lengths(char(*arr)[COLS], int rows) {
116114
117115 for (int i = 0 ; i < rows ; i ++ ) {
118116 int len = 0 ;
117+
118+ // "When an array name is passed to a function, the function can at its convenience believe that
119+ // it has been handed either an array or a pointer, and manipulate it accordingly.
120+ // It can even use both notations if it seems appropriate and clear."[1]:114
119121 for (int j = 0 ; j < COLS && arr [i ][j ] != '\0' ; j ++ ) {
120122 len ++ ;
121123 }
You can’t perform that action at this time.
0 commit comments