fork(1) download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. int valor = 0;
  5. scanf("%d", &valor);
  6. switch (valor) {
  7. case 0: {
  8. int variavel = 1;
  9. printf("%d", variavel);
  10. break;
  11. } default: {
  12. int variavel = 2;
  13. printf("%d", variavel);
  14. }
  15. }
  16. }
  17.  
  18. //https://pt.stackoverflow.com/q/176163/101
Success #stdin #stdout 0s 4344KB
stdin
Standard input is empty
stdout
1