Ask Question
10 December, 14:42

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. 10 December, 15:01
    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 & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers