char array (text)
Try it yourself →In C, text is a character array.
Syntax
char name[] = "text";
Description
There is no separate string type in C; text is a char array and ends with a hidden '\0' (terminator).
Example
#include <stdio.h>
int main() {
char name[] = "Alex";
printf("%s\n", name);
printf("%c\n", name[0]);
return 0;
}Expected output
Alex A
When to use?
Text storage.