Question: convert the c code to mips int main() { string s; char ch; cout < < Enter a string: ; getline(cin, s); cout < <

convert the c code to mips

int main()

{

string s;

char ch;

cout << "Enter a string: "; getline(cin, s);

cout << "Enter a character: "; cin >> ch;

int count = 0;

for(int i = 0; i < s.length(); ++i)

{

if(s[i] == ch)

{

count++;

}

}

cout << "number of " << ch << " in " << s << " is " << count << endl; return 0; }

no psuedo instructions comments please

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!