123
double d = 1.2345; int i = d*100;// here truncates to 123, you can use d*pow(10,n) where 'n' is the number of decimal digits you want d = i/100.0;// convert back to double -NOTICE: doubles are not precise so you can't have a precise truncation-