Ask Question
4 May, 08:17

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.

+4
Answers (1)
  1. 4 May, 10:40
    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?
Find 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 and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers