fork download
  1. #include <stdio.h>
  2.  
  3. int main()
  4. {
  5. float f = 10.2;
  6. int i = int(f);
  7.  
  8. printf("i: %d\n", i);
  9. }
  10.  
  11.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.c: In function 'main':
prog.c:6:12: error: expected expression before 'int'
    int i = int(f);
            ^
prog.c:5:10: warning: unused variable 'f' [-Wunused-variable]
    float f = 10.2;
          ^
stdout
Standard output is empty