Per suggestions and feedback from Affine, removed a loop that initialized the charCount array, since modern C allows us better ways to do this. Saved 5 instructions in the binary :3
This commit is contained in:
parent
136abce9bf
commit
207fe60c5b
1 changed files with 1 additions and 7 deletions
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
int main(){
|
||||
|
||||
int charCount[11]; /*Array for storing char lengths*/
|
||||
int charCount[11] = { 0 }; /*Array for storing char lengths*/
|
||||
|
||||
int last, lCount, state, i; /*last stores last character, or 0 at init.
|
||||
lCount increments every time the main for
|
||||
|
|
@ -27,12 +27,6 @@ int main(){
|
|||
character and then resets when one is
|
||||
encountered after commiting its value
|
||||
to charCount.*/
|
||||
/*Begin array initialization*/
|
||||
for(i = 0; i < 11; ++i){
|
||||
charCount[i] = 0;
|
||||
}
|
||||
/*End array init*/
|
||||
|
||||
|
||||
last = lCount = 0;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue