sprintf-%s的用法

@2018-9-19 

sprintf-%s的用法

 1 #include <stdio.h>
 2 #include <string.h>
 3 
 4 
 5 char string[] = "I am  a MCUer!";
 6 int vHex = 0xac34;
 7 
 8 
 9 int main(void)
10 {
11     char tempString[20];
12 
13     sprintf(tempString, "%X, %s", vHex, string);
14 
15     printf("%s
", tempString);
16 }

运行结果

原文地址:https://www.cnblogs.com/skullboyer/p/9673808.html