美文网首页
C/C++数字后面的L是什么意思?

C/C++数字后面的L是什么意思?

作者: 程序员__ | 来源:发表于2019-01-08 15:18 被阅读36次

#include <stdio.h>

#include <stdlib.h>

#include <time.h>

int main(void) 

   long i = 10000000L; 

   clock_t start, finish; 

   double duration; 

   /* 测量一个事件持续的时间*/ 

   printf( "Time to do %ld empty loops is ", i) ; 

   start = clock(); 

   while( i-- ); 

   finish = clock(); 

   duration = (double)(finish - start) / CLOCKS_PER_SEC; 

   printf( "%f seconds\n", duration ); 

   system("pause"); 

   return 0;

问题: long i = 10000000L; 中的L是什么意思??

推荐C语言C++学习交流群:466572167

解答:表明这个数是long int类型。

相关文章

网友评论

    本文标题:C/C++数字后面的L是什么意思?

    本文链接:https://www.haomeiwen.com/subject/htxbrqtx.html