Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - Both integer arrays and character arrays can be input and output as a whole. ( )
Both integer arrays and character arrays can be input and output as a whole. ( )
C language stipulates that array elements can only be referenced one by one, and the whole array cannot be referenced at one time. For character arrays, you can input or output the entire string at once.

Character array is used to store characters or strings, and one element in the character array stores one character, occupying one byte of memory. C language has no string type, and strings are stored in character arrays.

Extended data:

In C language, a string is regarded as an array of characters. In order to measure the actual length of a string, C language specifies a "string terminator" with the character' \0' as the terminator.

There is no essential difference between the initialization of character array and the initialization of numeric array. But it can not only assign characters to array elements one by one, but also initialize them directly with strings.