fork download
  1. #include <stdio.h>
  2. struct cad_produto{
  3. char nome[65];
  4. int cod
  5. char descricao[31];
  6. };
  7.  
  8. int i, cod;
  9.  
  10. int main(void) {
  11.  
  12. printf("Digite um numero: ");
  13. scanf("%d", cod);
  14.  
  15. printf("\n O numero digitado foi %d ", cod);
  16.  
  17. return 0;
  18. }
  19.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.c:5:1: error: expected ‘:’, ‘,’, ‘;’, ‘}’ or ‘__attribute__’ before ‘char’
 char descricao[31];
 ^~~~
prog.c: In function ‘main’:
prog.c:13:10: warning: format ‘%d’ expects argument of type ‘int *’, but argument 2 has type ‘int’ [-Wformat=]
  scanf("%d", cod);
          ^
stdout
Standard output is empty