1234567891011121314151617181920212223 |
- #include <stdio.h>
- #include <time.h>
- /*
- * hello.c
- */
- int main2(void) {
- printf("Hello World!\n");
- printf("long lenth = %d, int lenth = %d\n", sizeof(long), sizeof(int));
- int a;
- long b;
- printf("a = %d\n", a);
- printf("b = %d\n", b);
- double cpu_temp;
- unsigned int ticksnow; /* clock_t is same as int */
- ticksnow = (unsigned int)clock();
- cpu_temp = (double)((double)ticksnow/CLOCKS_PER_SEC);
- printf("cpu_temp = %lf\n", cpu_temp);
- return 0;
- }
|