Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

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:

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote