Question: Question 1 (10 pt.) Write a program that asks the user for an input string and removes all space characters from it. The program then

Question 1 (10 pt.) Write a program that asks the user for an input string and removes all space characters from it. The program then prints the resulting string without spaces. a) (8 pt.) Write the full MIPS program and submit it in a file named ql.asm. b) (2 pt.) Run it on MARS and show the output of the simulation. Make sure to enter a string containing spaces to demonstrate the correct functionality of the algorithm. The following C code shows the proposed algorithm. The string is traversed with two indices, called old_index and new_index, where the latter always takes a value less or equal to the former. When a non-space character is found, the character at position old_index is copied to position new_index, and both indices are incremented. When a space is found, the current character is not copied, and only old_index is incremented. The algorithm stops when a null character is found. #include
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
