Check out example codes for "How to Convert double to int in C". It will help you in understanding the concepts better.

Code Example 1

double a = 12.34;
int b = a ;
//b = 12 not 12.34

Learn ReactJs, React Native from akashmittal.com