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:
Reina Harrington-Affine 2025-08-22 18:32:09 +00:00
parent 136abce9bf
commit 207fe60c5b

View file

@ -19,7 +19,7 @@
int main(){ 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. int last, lCount, state, i; /*last stores last character, or 0 at init.
lCount increments every time the main for lCount increments every time the main for
@ -27,12 +27,6 @@ int main(){
character and then resets when one is character and then resets when one is
encountered after commiting its value encountered after commiting its value
to charCount.*/ to charCount.*/
/*Begin array initialization*/
for(i = 0; i < 11; ++i){
charCount[i] = 0;
}
/*End array init*/
last = lCount = 0; last = lCount = 0;