Assume that scotus is a two-dimensional character array that stores the family names (last names ) of the nine justices on the Supreme Court of the United States. Assume no name is longer than twenty characters. Assume that scotus has been initialized in alphabetical order. Write an expression whose value is the last name stored in the array .

LANGUAGE: C++

CHALLENGE:

Assume that scotus is a two-dimensional character array that stores the family names (last names ) of the nine justices on the Supreme Court of the United States. Assume no name is longer than twenty characters. Assume that scotus has been initialized in alphabetical order. Write an expression whose value is the last name stored in the array.

SOLUTION:

The Bad News: The content you are trying to access is only available to members.

The Good News: You too can be a member, simply Click Here.

Already a member?

Posted in ,

3 Comments

  1. Duane Dickhut on November 13, 2014 at 10:20 pm

    Assume that scotus is a two-dimensional character array that stores the family names (last names ) of the nine justices on the Supreme Court of the United States. Assume no name is longer than twenty characters . Assume that scotus has been initialized in alphabetical order. Write some code that will print each to standard output , each on a separate line with no other characters .
    for (int i = 0; i < 9; ++i)

    {
    int j = 0;
    while (j < 20 && scotus[i][j] != '')
    {
    cout << scotus[i][j];
    j++;
    } // end while

    // go to next line
    cout << endl;
    } // end for

  2. Rbnsdjn on October 29, 2016 at 11:46 am

    Assume that scotus is a two-dimensional character array that stores the family names (last names ) of the nine justices on the Supreme Court of the United States. Assume no name is longer than twenty characters . Assume that scotus has been initialized in alphabetical order. Write some code that will print each to standard output , each on a separate line with no other characters .

  3. Poop on December 9, 2016 at 7:07 pm

    This will print out the names of the justices each time the code is looped.

    for (int i = 0; i < 9; ++i)
    {
    cout << scotus[i] <<endl;

    }

Leave a Comment

You must be logged in to post a comment.