/* 問 次の空欄(_____)を埋めよ */
#include <stdio.h>
#define STRMAX 100 /* 文字列の要素数 */
int main(void)
{
char string[STRMAX];
char _____ = string; /* ポインタ変数ptを定義と同時に初期化 */
printf("Input string");
fgets(string, STRMAX, stdin);
/* 文字列の終わりまで処理を繰り返す */
while( *pt != _____ ){
printf("%c", _____ ); /* 1文字出力する */
if(*pt == ' '){
/* 他の空白がなくなるまでポインタを進める */
while( *pt==' ' ){
pt++;
}else{
/* 空白以外:ポインタを一つ進める */
pt++;
}
}
return 0;
}