Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个关于在 c 中重置数组的问题,我定义了一个这样的数组:
static int hello[5][6] = {{1,2,3,4,5,6},1,2,3,4,5,6},1,2,3,4,5,6},1,2,3,4,5,6},1,2,3,4,5,6}};
那么如何将每行和每行上的所有元素重置为0?
memset (hello, 0, sizeof(hello));
试试看: bzero(hello, sizeof(hello));