标签:c 计算字长 word length
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
标签:c 计算字长 word length
原文地址:http://blog.csdn.net/abnerwang2014/article/details/44756207