<u>Answer:</u>
<em>There are 2 ways to do extract the decimal part:
</em>
<u>Explanation:</u>
- <em>First method using number  </em>
<em>int main() {
</em>
<em>  double num = 23.345;
</em>
<em>  int intpart = (int)num;
</em>
<em>  double decpart = num - intpart;
</em>
<em>  printf(""Num = %f, intpart = %d, decpart = %f\n"", num, intpart, decpart);
</em>
<em>}
</em>
- <em>Second method using string:
</em>
<em>#include <stdlib.h>
</em>
<em>int main()
</em>
<em>{
</em>
<em>    char* inStr = ""123.4567"";          </em>
<em>    char* endptr;                      
</em>
<em>    char* loc = strchr(inStr, '.');
</em>
<em>    long mantissa = strtod(loc+1, endptr);
</em>
<em>    long whole = strtod(inStr, endptr);  </em>
<em>    printf(""whole: %d \n"", whole);      </em>
<em>    printf(""mantissa: %d"", mantissa);  
</em>
<em>}
</em>