首页 > 系统服务 > 详细

A program to compute word length of a machine

时间:2015-03-30 21:12:11      阅读:137      评论:0      收藏:0      [点我收藏+]

Go to my personal blog

There is a program to compute word length of a machine as below.

#include <stdio.h>

int wordlength(void);

int main()
{
    printf("Word Length: %d\n", wordlength());  
    return 0;
}

int wordlength(void)
{
    int i;
    unsigned v = (unsigned)~0;

    for (i = 1; (v = v >> 1) > 0; ++i)
        ;
    return i;
}


A program to compute word length of a machine

原文:http://blog.csdn.net/abnerwang2014/article/details/44756207

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!