diff --git a/1_3.test_code/c_test/testSprintf b/1_3.test_code/c_test/testSprintf/testSprintf similarity index 100% rename from 1_3.test_code/c_test/testSprintf rename to 1_3.test_code/c_test/testSprintf/testSprintf diff --git a/1_3.test_code/c_test/testSprintf/testSprintf.c b/1_3.test_code/c_test/testSprintf/testSprintf.c new file mode 100644 index 0000000..25c9e67 --- /dev/null +++ b/1_3.test_code/c_test/testSprintf/testSprintf.c @@ -0,0 +1,16 @@ +/************************************************************************* + > File Name: testSprintf.c + > Description: + > Conclusion: + > Author: rh_Jameson + > Created Time: 2015年06月29日 星期一 13时34分48秒 + ************************************************************************/ + +#include +int main(){ + char buffer[50]; + int val = 10; + sprintf(buffer, "helloworld %d", val); + printf("%s", buffer); + printf("%d, %d", __LINE__, __func__); +}