Rubin [Rub87] used the following example (rewritten here in C) to argue in favor of a goto

Question:

Rubin [Rub87] used the following example (rewritten here in C) to argue in favor of a goto statement:

int first_zero_row = -1; int i, j; /* none */ for (i = 0; i < n; i++) { for (j = 0; j < n; j++) { if (A[i] [j]) goto next; } first_zero_row = i; break; next: ; }

The intent of the code is to find the first all-zero row, if any, of an n × n matrix. Do you find the example convincing? Is there a good structured alternative in C? In any language?

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: