0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

cf4.c The C Puzzle Book

Last updated at Posted at 2025-05-28

職業訓練
https://qiita.com/kaizen_nagoya/items/95368b63fa21d64271ec

Programmer, Day 6
https://qiita.com/kaizen_nagoya/items/632d8f191268e88eb86a

C Puzzle Bookの有り難み5つ、C言語規格及びCコンパイラの特性を認識, error(21), coding(28)
https://qiita.com/kaizen_nagoya/items/d89a48c1536a02ecdec9

The C Puzzle Book
https://efrei.poupa.net/Programmation%20en%20C/Cours/The_C_Puzzle_Book.pdf

defs.h "The C Puzzle Book"
https://qiita.com/kaizen_nagoya/items/6d284651ac1244963bd9

cf4.c
#include<stdio.h>

char input[] = "SSSWILTECH1\1\11W\1WALLMP1";


int main()
{

        int i,c;

        for(i=2; (c = input[i]) != '\0'; i++)
        {
                switch(c)
                {
                        case 'a':putchar('i'); continue;
                        case '1':break;
                        case 1:while( (c = input[++i]) != '\1' && c != '\0' );
                        case 9:putchar('S');
                        case 'E': case 'L': continue;
                        default: putchar(c); continue;
                }
                putchar(' ');
        }
        putchar('\n');
}
bash
$ gcc cf4.c
$ ./a.out
SWITCH SWAMP
0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?