美文网首页
CCF试题C++、C语言学习笔记

CCF试题C++、C语言学习笔记

作者: 鲸鸟与鹿 | 来源:发表于2018-09-10 15:29 被阅读0次

VS中自动排版Alt+F8

memset(a,0,sizeof(a));

函数原型如下:

void *memset(void *s, int ch, size_t n);

函数解释:将s中前n个字节 (typedef unsigned int size_t)用 ch 替换并返回 s 。

这条语句是把a中所有字节换做字符“0”,常用来对指针或字符串的初始化。

相关文章

网友评论

      本文标题:CCF试题C++、C语言学习笔记

      本文链接:https://www.haomeiwen.com/subject/tfmsgftx.html