In C, you can create text (strings) in several ways:
1. **Directly**: You can create a string by initializing it with a string literal. A string literal is a sequence of characters enclosed in double quotes. For example:
```c
char str[] = "Hello, World!";
```
2. **Using pointers**: You can also create a string by defining a character pointer and assigning it to a string literal. For example:
```c
char *str = "Hello, World!";
```
3. **Using `malloc()`**: If you want to create a string dynamically (i.e., at runtime), you can use the `malloc()` function to allocate memory for the string. For example:
```c
char *str = malloc(14 * sizeof(char)); // Allocate memory for 14 characters
strcpy(str, "Hello, World!"); // Copy the string literal into the allocated memory
```
Remember to include the `<string.h>` header file if you're using `strcpy()`.
4. **Using `strdup()`**: If you're using a system that supports it (like GNU C Library), you can use `strdup()` to create a new string that is a duplicate of an existing string. For example:
```c
char *str = strdup("Hello, World!");
```
Remember to include the `<string.h>` header file if you're using `strdup()`.
Please note that in C, strings are just arrays of characters, and the last character of a string is always the null character (`'\0'`).