fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. // your code goes here
  5. char c;
  6. scanf("%c", &c);
  7. switch(c) {
  8. case 'c':
  9. printf("One\n");
  10. case 'c':
  11. printf("Two\n");
  12. }
  13. return 0;
  14. }
  15.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.c: In function ‘main’:
prog.c:10:3: error: duplicate case value
   case 'c':
   ^~~~
prog.c:8:3: note: previously used here
   case 'c':
   ^~~~
prog.c:6:2: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
  scanf("%c", &c);
  ^~~~~~~~~~~~~~~
stdout
Standard output is empty