fork(1) download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. char txt[10];
  5. scanf("%s", &txt);
  6. printf("%s", txt);
  7. }
  8.  
  9. //https://pt.stackoverflow.com/q/251918/101
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
teste
compilation info
prog.c: In function ‘main’:
prog.c:5:10: error: format ‘%s’ expects argument of type ‘char *’, but argument 2 has type ‘char (*)[10]’ [-Werror=format=]
  scanf("%s", &txt);
          ^
cc1: all warnings being treated as errors
stdout
Standard output is empty