Write a MIPS program that determines how many instances of a character occur in
ID: 3544033 • Letter: W
Question
Write a MIPS program that determines how many instances of a character occur in a null-terminated string.
The string is to be entered by the user at the keyboard, as is the character to count. You may assume that the string input is no longer than 60 characters.
Your solution must use a function to determine how many instances of the character occur in the string. The function takes two parameters: the base address of the string and the character to find. It should return an integer representing the number of instances of the character in the string.
The main function should get the string and character from the user, call your count function, and then output the result.
For example, if the string is
Explanation / Answer
Here is the equivament MIPS code:
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.