Explore BrainMass

Explore BrainMass

    C++ Programming (Arrays and Strings)

    Not what you're looking for? Search our solutions OR ask your own Custom question.

    This content was COPIED from BrainMass.com - View the original, and get the already-completed solution here!

    See attach file.

    F) Consider the following declaration:

    int beta[3][3];

    What is stored in beta after each of the following statements executes?

    2. for (i = 0; i < 3; i++)
    for (j = 0; j < 3; j++)
    beta[i][j] = i + j;
    Ans:

    3. for (i = 0; i < 3; i++)
    for (j = 0; j < 3; j++)
    beta[i][j] = i * j;
    Ans:

    © BrainMass Inc. brainmass.com November 30, 2021, 12:18 am ad1c9bdddf
    https://brainmass.com/computer-science/cpp/programming-arrays-strings-33488

    Attachments

    Solution Preview

    2.
    for (i = 0; i < 3; i++)
    for (j = 0; j < 3; j++)
    beta[i][j] = i + j;

    Ans:
    beta[0][0] = 0+0 = 0
    beta[0][1] = 0+1 = 1
    beta[0][2] = ...

    Solution Summary

    The arrays and strings for a C++ program is examined.

    $2.49

    ADVERTISEMENT