You could try my snip function!

Code:

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
// Snip the double value of where you want it to be snipped
double
snip (double d, // The decimal value we want to snip
int dp) // The decimal places of where to snip
{
// Bring the decimal number up to an integer of where we want to cut
// And snip it
d = floor (d * pow (10, dp));
// Bring the integer back to a decimal by moving the decimal place back to the left
d = d / pow (10, dp);
// Successfully return the snipped version of the decimal
return d;
}
int main (void)
{
// n = The number we want to snip
// n2 = The result of the snipping
double n = 3.14823723;
double n2;
// Snip the large decimal
n2 = snip (n, 2);
// Print out the results
printf ("%f = ~%f\n", n, n2);
// Return successfully
return 0;
}