N=1

主にコンピュータ技術関連のことを投稿。 / 投稿は個人の意見であり所属団体の立場を代表するものではありません。

2007-11-30から1日間の記事一覧

1-19.c

演習 1-19 文字列sを逆に並べる関数reverse(s)を書け。さらに、この関数を使って、入力を一時に1行ずつ逆転するプログラムを書け。 #include <stdio.h> #define MAXLINE 1000 void reverse(char s[]) { int c, len; char temp; for (len = 0; s[len] != '\0'; ++len)</stdio.h>…

1-18.c

演習 1-18 各入力行から、行の後のブランクやタブを取り除き、かつ空白行は全て削除するようなプログラムを書け。 #include <stdio.h> #define MAXBLANK 1000 #define TRUE 1 #define FALSE 0 main() { int c; int i; /* 空白文字の一時保存 */ int blcount = 0; char</stdio.h>…