笔试2019-GRANDSTREAM

程序阅读

随机,因为局部变量在栈中,值随机。

上面那个题在x86上都是12因为x86是大端模式
但是在ARM架构的处理器,因为它们是小端模式,则输出x078

判断回文


int hui(const char * s)
{
    if(s == NULL)  return 0;
    int i,j = strlen(s)-1;
    for(i=0; j>i && s[i] == s[j]; i++,j--)
        ;
    return  j>i ? 0 : 1;
}

猜你喜欢

转载自www.cnblogs.com/wjundong/p/11688420.html