如何才能找到使用C程序我的机器是16位或32位或64位 [英] How can find using c-program whether my machine is 16-bit or 32-bit or 64-bit

查看:103
本文介绍了如何才能找到使用C程序我的机器是16位或32位或64位的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人能给简单的C程序来找到我的机器是16位或32位还是64位?

Can somebody give simple c-program to find whether my machine is 16-bit or 32-bit or 64-bit ?

推荐答案

如果您是关于Linux操作系统的关注才可以使用的uname()call.You可以通过结构的utsname这个API,并可以得到详细信息。您可以在以下网址获得进一步的细节。

If you are concern about linux OS only then you can use uname() call.You can pass struct utsname to this API and can get the details. You can get further details on following URL

http://linux.die.net/man/2/uname

也在考虑uname命令源$ C ​​$ C可以帮助你更多关于这个。

Also looking into the uname command source code can help you more on this.

这篇关于如何才能找到使用C程序我的机器是16位或32位或64位的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆