回答編集履歴

2

returnを忘れてた…exitもreturnにした

2016/11/12 01:10

投稿

raccy
raccy

スコア21735

test CHANGED
@@ -76,7 +76,7 @@
76
76
 
77
77
  fprintf(stderr, "stdin is end of file.");
78
78
 
79
- exit(1);
79
+ return 1;
80
80
 
81
81
  }
82
82
 
@@ -100,6 +100,8 @@
100
100
 
101
101
  }
102
102
 
103
+ return 0;
104
+
103
105
  }
104
106
 
105
107
  ```

1

inlien staticにする。

2016/11/12 01:10

投稿

raccy
raccy

スコア21735

test CHANGED
@@ -18,7 +18,7 @@
18
18
 
19
19
  // nan 未対応
20
20
 
21
- int double_compare(const void *a, const void *b)
21
+ inline static int double_compare(const void *a, const void *b)
22
22
 
23
23
  {
24
24
 
@@ -36,7 +36,7 @@
36
36
 
37
37
  {
38
38
 
39
- double arr[N + 1] = {0}; // 全部 0 で初期化N + 1 個にすること。
39
+ double arr[N + 1] = {0}; // 全部 0 で初期化 N + 1 個にすること。
40
40
 
41
41
  arr[N] = NAN; // 終端を nan にする。
42
42