String
Dependency
Human
Character Array / 字符数组
Declaration
char test1[20]; // define a char array without initialization
char test2[20] = "1234"; // declare a char array with "1234" as content
char test3[] = "abc"; // size of array can be omitted/* header */
#include <string.h>
/* declaration */
void *memset( void *dest, int ch, size_t count );
// (since C11)
errno_t memset_s( void *dest, rsize_t destsz, int ch, rsize_t count );
/* usage */
char test1[20];
memset(test1, 0, sizeof(test1)); // maybe it's safer to clean up before useAssignment & Copy
String Format
String-Number Conversion
String Matching
Last updated