SHARE
TWEET

double-casts

Archon Nov 23rd, 2010 84 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <stdlib.h>
  2. #include <stdio.h>
  3. int main(){
  4.    float f = 1.5;
  5.    printf("%f --> %d --> %f\n", f, (int)f, (float)(int)f);
  6.  
  7.    int i = 1;
  8.    printf("1 == %i\n", (int)(float)i);
  9. }
RAW Paste Data
Top