Ask Question
22 March, 13:45

Write a method countstrings that takes an array of strings and a target string and returns the number of occurences target appears in the array.

+5
Answers (1)
  1. 22 March, 16:25
    0
    Here is a pseudocode for your function, you can implement it using your programming language with syntax modifications.

    int countstrings (string[] list, string target) {

    int counter = 0;

    for (int i=0; i
    if (list[i] = = target)

    {

    counter++;

    }

    }

    return counter;

    }
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “Write a method countstrings that takes an array of strings and a target string and returns the number of occurences target appears in the ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers