assembly - 带有数组的 MIPS while 循环
问题描述
如何将此 c++ 代码转换为 MIPS 汇编代码?
bool isPalindrome(char str[], int n) {
for (int i = 0; i < n / 2; i++) {
// compare the two ends of the string
if (str[i] == str[n - 1 - i])
continue; // if they are the same, check the next pair
else
return false; // if they are different, return false
}
return true;
}
解决方案
推荐阅读
- angular - 打字稿功能顺序不正确
- vba - 使用 VBA 在 MS Access 中编目字文件数据
- c# - “名称在当前上下文中不存在”,C#
- python-2.7 - Python 2.7 动态长度列表理解
- bokeh - 从 Bokeh Server 获取单个图形的 URL
- dialogflow-es - Google Action,隐式帐户链接 DialogFlow webhook
- javascript - 比较javascript中的数组值
- android - Android HttpURLConnection getResponseCode() 400 - 为什么?
- php - 从functions.php中的代码检索wordpress中的当前orderid
- node.js - 如何获取最新的节点包?