fork download
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. int main(int argc, char const *argv[]) {
  5. int n = 5;
  6. int *p = malloc( n * sizeof(int));
  7. printf("%d\n", n);
  8. }
  9.  
  10. //https://pt.stackoverflow.com/q/198478/101
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.c: In function ‘main’:
prog.c:6:10: error: unused variable ‘p’ [-Werror=unused-variable]
     int *p = malloc( n * sizeof(int));
          ^
cc1: all warnings being treated as errors
stdout
Standard output is empty