i need to convert this C code to mips assembly. If you cant do this exact code i
ID: 3659166 • Letter: I
Question
i need to convert this C code to mips assembly. If you cant do this exact code i would take any string search algorithm. here is the code int StrLen( const char* str ) { const char* ptr = str; for ( ; 1; ++ptr ) { if ( *ptr == '' ) return ptr - str; } } #define MAX_S 101 /** max text length 100 **/ #define MAX_P 21 /** max pattern length 20 **/ char s[MAX_S]="HERE IS A SIMPLE EXAMPLE", p[MAX_P]="EXAMPLE"; /** s is text; p is pattern **/ int nextv[MAX_P]; /** p's nextv array **/ void init_nextv() { int i = 0, j = -1; int p_len; /** pattern length **/ p_len = StrLen(p); nextv[0] = -1; while (iExplanation / Answer
its very difficult to understand the question as data is not clear... post the question rather in a proper tables or images so dat i can solve it and give u the best possible answer...
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.