1 vote
Accepted

Why does this become an infinite loop?

The infinite loop lies here: while(j < rows) { printf("#"); (i++); } The loop depends on the value of j being updated and eventually not less than rows. Since j is never changed ...
  • 64.6k

Only top scored, non community-wiki answers of a minimum length are eligible