c int to char

2022-05-08

以下示例是关于C中包含c int to char用法的示例代码,想了解c int to char的具体用法?c int to char怎么用?c int to char使用的例子?那么可以参考以下相关源代码片段来学习它的具体使用方法。

[英]:c int to char源码类型:C
int i = 7;
char str[256];

itoa(i,str,10); //Base 10

char c = str[0]; // c="7"

本文地址:https://www.itbaoku.cn/snippets/785423.html