previous | index | next

Another Example

Q: What output does the following produce?

    for (int row = 0; row < SIZE; row++) {
        for (int col = 0; col < SIZE; col++) {
          table[row][col] = (row+1) * (col+1);
      }
    }
    
    for (int row = 0; row < SIZE; row++) {
        for (int col = 0; col < SIZE; col++) {
          cout << table[row][col] << "  ";
        }
        cout << endl;
    }


previous | index | next