sprintf拼接字符串

 今天偶遇到一個關於關於此函數的一個問題,好像是一個大學考試題,sprintf()函數是向buf緩存區輸出必定格式的字符串,例如:web #include<stdio.h> int main() { char buf[1024]={0}; char *p = "hello"; int n = sprintf(buf,"%s",p); printf("str: %s\
相關文章
相關標籤/搜索