fprintf输出到文件中,sprintf输出到字符串中. 如: fprintf(fp,"%s",name); fp为文件指针 sprintf(buff,"%s",name); buff为字符数组
fprintf输出到文件中,sprintf输出到字符串中. 如: fprintf(fp,"%s",name); fp为文件指针 sprintf(buff,"%s",name); buff为字符数组
推荐阅读
- [Swift]LeetCode677. 键值映射 | Map Sum Pairs
- [Swift]LeetCode678. 有效的括号字符串 | Valid Parenthesis String
- [Swift]LeetCode679. 24点游戏 | 24 Game
- [Swift]LeetCode680. 验证回文字符串 Ⅱ | Valid Palindrome II
- [Swift]LeetCode682. 棒球比赛 | Baseball Game
- [Swift]LeetCode684. 冗余连接 | Redundant Connection
- [Swift]LeetCode685. 冗余连接 II | Redundant Connection II
- [Swift]LeetCode686. 重复叠加字符串匹配 | Repeated String Match
- [Swift]LeetCode687. 最长同值路径 | Longest Univalue Path
- [Swift]LeetCode688. “马”在棋盘上的概率 | Knight Probability in Chessboard