c语言数字转为字符a,C语言之数字转化为字符串的库函数(The number of C languages is converted into a library function of string...

C语言之数字转化为字符串的库函数(The number of C languages is converted into a library function of strings)

C语言之数字转化为字符串的库函数(The number of C languages is converted into a library function of strings)

Q-how can worry about, like a river flows to the east. Changying in hand today, when bound dragon? Ewha Rongrong courtyards, energy-saving. A thousand miles to meet, no cross, not met. Try to burn the jade for three days, and the wood must be planted for seven years. The C language is converted into a string library function

Published: 13:18 yesterday | classification: personal diary read: (1) comments: (0)

What we used to do are as follows:

1, Itoa

Function: converts a long plastic to a string.

Usage: char, *Itoa (long, value, char, *string, int, Radix);

Detailed explanation: Itoa is English long, integer, to, array (long int long integer into a string, and save the value in the array string) abbreviation.

Parameter:

Value: long integer to be converted.

Radix: is the meaning of the base, that is, the first value into the radix hexadecimal number, range of 2-36, such as 10 for the 10 hexadecimal, and 16 for the 16 hexadecimal.

* string: saves the converted strings.

Return value:

Char *: points to the generated string, the same as *string.

Note: the header file of this function is "stdlib.h"".

2, Ultoa

Function: converts an unsigned long plastic to a string.

Usage: char, *Ultoa (unsigned, long, value, char, *string, int, Radix);

Detailed explanation: Uitoa is English unsigned long integer to array (unsigned, long, int, unsigned long integer into a string, and the value stored in the array string) abbreviation.

Parameter:

Unsigned long integers to be converted to value.

Radix: is the meaning of the base, that is, the first value into the radix hexadecimal number, range of 2-36, such as 10 for the 10 hexadecimal, and 16 for the 16 hexadecimal.

* string: saves the converted strings.

Return value:

Char *: points to the generated string, the same as *string.

Note: the header file of this function is "stdlib.h"".

3, Gcvt

Function: converts floating point numbers to strings, and take

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值