Skip to main content
Mod Removes Wiki by Doorknob
there has to be a space between d and closing (") .correct: scanf("%*d ");
Source Link
  1. use scanf("%*d""%*d "); to read the dummy input. (in case that input is meaningless in further program) it is shorter than scanf("%d",&t); where you also need to declare the variable t.

  2. storing characters in int array is much better than character array. example.

    s[],t;main(c){for(scanf("%*d""%*d ");~(c=getchar());s[t++]=c)putchar(s[t]);}

  1. use scanf("%*d"); to read the dummy input. (in case that input is meaningless in further program) it is shorter than scanf("%d",&t); where you also need to declare the variable t.

  2. storing characters in int array is much better than character array. example.

    s[],t;main(c){for(scanf("%*d");~(c=getchar());s[t++]=c)putchar(s[t]);}

  1. use scanf("%*d "); to read the dummy input. (in case that input is meaningless in further program) it is shorter than scanf("%d",&t); where you also need to declare the variable t.

  2. storing characters in int array is much better than character array. example.

    s[],t;main(c){for(scanf("%*d ");~(c=getchar());s[t++]=c)putchar(s[t]);}

Added code formatting
Source Link
Gareth
  • 11.4k
  • 1
  • 36
  • 85
  1. use scanf("%*d");scanf("%*d"); to read the dummy input. (in case that input is meaningless in further program) it is shorter than scanf("%d",&t);scanf("%d",&t); where you also need to declare the variable t.

  2. storing characters in int array is much better than character array. example.

    s[],t;main(c){for(scanf("%*d");~(c=getchar());s[t++]=c)putchar(s[t]);}s[],t;main(c){for(scanf("%*d");~(c=getchar());s[t++]=c)putchar(s[t]);}

  1. use scanf("%*d"); to read the dummy input. (in case that input is meaningless in further program) it is shorter than scanf("%d",&t); where you also need to declare the variable t.

  2. storing characters in int array is much better than character array. example.

    s[],t;main(c){for(scanf("%*d");~(c=getchar());s[t++]=c)putchar(s[t]);}

  1. use scanf("%*d"); to read the dummy input. (in case that input is meaningless in further program) it is shorter than scanf("%d",&t); where you also need to declare the variable t.

  2. storing characters in int array is much better than character array. example.

    s[],t;main(c){for(scanf("%*d");~(c=getchar());s[t++]=c)putchar(s[t]);}

Source Link

  1. use scanf("%*d"); to read the dummy input. (in case that input is meaningless in further program) it is shorter than scanf("%d",&t); where you also need to declare the variable t.

  2. storing characters in int array is much better than character array. example.

    s[],t;main(c){for(scanf("%*d");~(c=getchar());s[t++]=c)putchar(s[t]);}