⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ex9_2.c

📁 自己做的常用库和实现的数据结构。public domain.
💻 C
字号:
/*
  Ex9_2
  Test if my computer use LOGIC-SHIFT or ARITHMATIC-SHIFT
  my coputer type -- AST 386
*/
 
main()
{
   int bitnum;

    printf("--- If logic-shift--right,\n then left part will be filled with 0\
 no matter the int is positive or negative.\n");
    printf("---- If arithmatic-shift-right\n then left-part will be filled with\
 sign-bit.---\n");

    bitnum = ~0 >> 1;

    if (bitnum < 0)
    {
        printf("~0>>1=%d\n",~0>>1);
        printf(" This machine using arithmatic-shift-right!\n");
    }
    else
        printf(" This machine using logic-shift-right!\n");
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -