Convert double value to a char array in C

后端 未结 6 707
陌清茗
陌清茗 2021-01-05 02:36

How do I convert double value to a char array in C?

double a=2.132;
char arr[8];

Is there any way to do this in standard C? Can anyone give

6条回答
  •  太阳男子
    2021-01-05 03:14

    double b=222.215;

            String bb=""+b;
    
            char[] tab=new char[bb.length()];
    
            for(int m=0;m

提交回复
热议问题