易截截图软件、单文件、免安装、纯绿色、仅160KB

c数据类型问题,懂得朋友进来看看,谢谢

用dev-c++编译的
是c primer plus 的例题
程序如下:
#include <stdio.h>
#include <stdlib.h>

int main(void)
{
    unsigned int un = 3000000000; /* 32位int */
    short end = 200;
    long big = 65537;
    long long verybig = 12345678908426;
    printf ("un = %u and not %d\n",un, un);
    printf ("end = %hd and %d\n",end ,end);
    printf ("big = %ld and not %hd\n", big, big);
    printf ("verybig = %lld and not %d\n",verybig, verybig);
    system("PAUSE");
    return 0;
}
编译出警告:7 [Warning] this decimal constant is unsigned only in ISO C90
            10[Warning] integer constant is too large for "long" type

up

7 [Warning] this decimal constant is unsigned only in ISO C90
gcc有时候也有这个警告,加上 -std=c99 选项可以通过。 dev-c++没用过

10[Warning] integer constant is too large for "long" type
试试在常数后面加上LL  long long verybig = 12345678908426LL;


是编译器的问题吧!vs2008报错误、警告数都为零,能正常运行。

引用
7 [Warning] this decimal constant is unsigned only in ISO C90
gcc有时候也有这个警告


相关问答:

jsp中 <c:if test> 相关问题

在查询后将查询出来的值赋给各输入框
<c:if test="${not empty dataValue}">
      fm.SAMPLING_DATE.value=" <c:out value='${dataValue.SAMPLING_DATE}'/ ......

c基础

#include <string.h>
#include <stdio.h>

void main()
{
int i;
char buf[]="abcde";
strncpy(buf,"abc",3);
for(i=0;i <5;i++)
printf(&q ......

一个简单的c游戏

13个人围成一圈,从第一个人开始顺序报号1,2,3。凡报到3者退出圈子,找出最后留在圈子中的人原来的序号
结果应该是13 可我的程序的结果是11 希望好心人帮改一下
#include <stdio.h>
#include < ......

在c版块的你们都从事什么工作?

我看学生比较多...
额是业余的……

偶是业余学生

我本来想学c侵入式学习
可觉得学java容易些
所以改为j2ee方向

看来我的估计是准确的, 因为大部分工作的人都用c++或者java, .NET之类...

c/php/p ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号