64位有符号与无符号类型的整数

原文链接: http://blog.csdn.net/lmyclever/article/details/6744906

  • 有符号型64位整数,值域为:-9223372036854775808 .. 9223372036854775807。

    语言 GNU C/C++ Pascal Visual C/C++
    类型名称 __int64
    or
    long long
    int64 __int64
    输入方法 scanf("%I64d", &x);
    or
    cin >> x;
    read(x); scanf("%I64d", &x);
    输出方法 printf("%I64d", x);

    cout << x;
    write(x); printf("%I64d", x);
  • 无符号型64位整数,值域为:0 .. 18446744073709551615。

    语言 GNU C/C++ Pascal Visual C/C++
    类型名称 unsigned __int64
    or
    unsigned long long
    qword unsigned __int64
    输入方法 scanf("%I64u", &x);
    or
    cin >> x;
    read(x); scanf("%I64u", &x);
    输出方法 printf("%I64u", x);
    or
    cout << x;
    write(x); printf("%I64u", x);
 
 
 
 
 
 
原文地址:https://www.cnblogs.com/huhu0013/p/4669645.html