Question: Can you please rewrite following code in MIps(ASSembly Language) and Use MARS4_5 to rewrite this code. #include using namespace std; int main() { char s[101];

Can you please rewrite following code in MIps(ASSembly Language) and Use MARS4_5 to rewrite this code.

#include using namespace std; int main() { char s[101]; printf("Enter string: "); scanf("%[^ ]S",s); int flag=0; int i; char str[101]; int k=0; int c=0; for(i=0;s[i];i++) { if(s[i]!=' ') { if(s[i]>='a'&&s[i]<='z') str[k++]=s[i]-32; else str[k++]=s[i]; if(flag==0) { flag=1; c++; } } else { flag=0; str[k++]=s[i]; } } printf("Original string is: %s ",s); printf("New string is: %s ",str); printf("No of words in string is: %d",c); }

Can toh please convert that code into MIPS LANGUAGE USE MARS4_5 version

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!