C
- voluntas
- @ignis_fatuus
- ブン
- @Linda_pp
- 清楚なC++メイドBOT
- @tzik_tack
- 長谷川一輝
- wraith13
- @jj1bdx
- @cpp_akira
- 安藤敏彦
- @srz_zumix
- Siv3D
- takezoh
- まろ
- @okdshin
- @hnokx
- @ishidakei
- @take_cheeze
- TAKEI Yuya
- @mumumu
- I (@wx257osn2)
- Tommy6
- @tyottyoworks
- ___shanon
- わたやん
- @KorekaraSEDB
- @kariya_mitsuru
- @ciniml
- @beam2d
- @grafi_tt
- @nekketsuuu
- LouiS0616
- @volanja
- 大鎌広
- むてら
- ガチKGB
- 三重野賢人
x
18
1
2
3
4
int main (void)
5
{
6
printf("enter the string : ");
7
char ch,str[100],sen[100];
8
fgets(str,sizeof(str),stdin);
9
printf("enter the character : ");
10
scanf("%c",&ch);
11
printf("enter the sentence : ");
12
fgets(sen,sizeof(sen),stdin);
13
printf("\n");
14
printf("character is : %c\n",ch);
15
printf("string is : %s\n",str);
16
printf("sentence is : %s\n",sen);
17
return 0;
18
}
$ gcc prog.c -Wall -Wextra -std=gnu11
Stdin
12345
67890
Start
enter the string : enter the character : enter the sentence : character is : 6 string is : 12345 sentence is : 7890
0
Finish