質問編集履歴
2
コードの訂正
title
CHANGED
File without changes
|
body
CHANGED
@@ -11,26 +11,28 @@
|
|
11
11
|
toupper関数は以下のwebサイトを参考にしました。
|
12
12
|
[参考サイト](http://www.c-lang.net/%E5%A4%A7%E6%96%87%E5%AD%97%E3%83%BB%E5%B0%8F%E6%96%87%E5%AD%97%E3%81%AB%E5%A4%89%E6%8F%9B%E3%81%99%E3%82%8B-2/index.html)
|
13
13
|
|
14
|
+
[インクルードしたライブラリ](https://linuxjm.osdn.jp/html/LDP_man-pages/man3/toupper.3.html)
|
15
|
+
|
14
16
|
###発生している問題・エラーメッセージ
|
15
17
|
|
16
18
|
```
|
17
19
|
% gcc -Wall ex2_4.c -o ex2_4
|
18
20
|
ex2_4.c: In function 〓〓〓main〓〓〓:
|
19
|
-
ex2_4.c:
|
21
|
+
ex2_4.c:7:9: warning: format 〓〓〓%c〓〓〓 expects argument of type 〓〓〓char *〓〓〓, but argument 2 has type 〓〓〓int〓〓〓 [-Wformat=]
|
20
22
|
scanf("%c", a);
|
21
23
|
^
|
22
|
-
ex2_4.c:6:12: warning: implicit declaration of function 〓〓〓toupper〓〓〓 [-Wimplicit-function-declaration]
|
23
|
-
char b = toupper(a);
|
24
|
-
^
|
25
|
-
ex2_4.c:
|
24
|
+
ex2_4.c:7:3: warning: 〓〓〓a〓〓〓 is used uninitialized in this function [-Wuninitialized]
|
26
25
|
scanf("%c", a);
|
27
26
|
^
|
28
27
|
|
28
|
+
|
29
29
|
```
|
30
30
|
|
31
31
|
###該当のソースコード
|
32
32
|
```c
|
33
33
|
#include<stdio.h>
|
34
|
+
#include <ctype.h>
|
35
|
+
|
34
36
|
int main(){
|
35
37
|
char a;
|
36
38
|
printf("input a small character =");
|
1
情報追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -8,6 +8,9 @@
|
|
8
8
|
capital is = A //返される文字
|
9
9
|
```
|
10
10
|
|
11
|
+
toupper関数は以下のwebサイトを参考にしました。
|
12
|
+
[参考サイト](http://www.c-lang.net/%E5%A4%A7%E6%96%87%E5%AD%97%E3%83%BB%E5%B0%8F%E6%96%87%E5%AD%97%E3%81%AB%E5%A4%89%E6%8F%9B%E3%81%99%E3%82%8B-2/index.html)
|
13
|
+
|
11
14
|
###発生している問題・エラーメッセージ
|
12
15
|
|
13
16
|
```
|