fork(2) 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. }
Success #stdin #stdout 0s 2172KB
stdin
Standard input is empty
stdout
1