You need a 2 dimensional character array to have an array of strings:

#include <stdio.h>

int main()
{
    char strings[3][256];
    scanf("%s %s %s", strings[0], strings[1], strings[2]);
    printf("%s\n%s\n%s\n", strings[0], strings[1], strings[2]);
}
Answer from cybermage14 on Stack Overflow
🌐
GeeksforGeeks
geeksforgeeks.org › c language › storage-for-strings-in-c
Storage for Strings in C - GeeksforGeeks
July 23, 2025 - In C, a string can be referred to either using a character pointer or as a character array. ... char str[4] = "GfG"; /*One extra for string terminator*/ /* OR */ char str[4] = {‘G’, ‘f’, ‘G’, '\0'}; /* '\0' is string terminator */ ...
🌐
Quora
quora.com › How-do-I-store-a-string-in-C
How to store a string in C - Quora
Answer (1 of 4): String literals are stored in C as an array of chars, terminted by a null byte. A null byte is a char having a value of exactly zero, noted as '\0'. Do not confuse the null byte, '\0', with the character '0', the integer 0, ...
🌐
CS UIC
cs.uic.edu › ~jbell › CourseNotes › C_Programming › CharacterStrings.html
C Programming Course Notes - Character Strings
A String Literal, also known as a string constant or constant string, is a string of characters enclosed in double quotes, such as "To err is human - To really foul things up requires a computer." String literals are stored in C as an array of chars, terminted by a null byte.
🌐
Substack
andrewjohnson4.substack.com › p › understanding-how-c-strings-are-stored
Understanding How C Strings Are Stored in the Data Section of a C Program
October 24, 2024 - In the above code, "Hello, World!" is stored in the read-only part of the Data segment. The pointer str points to the address where this literal is stored. String literals are stored in a read-only section to prevent accidental modifications.
🌐
Scaler
scaler.com › home › topics › string pointer in c
String Pointer in C - Scaler Topics
January 16, 2024 - Individual characters in C are enclosed within a single quote for example, 'a', 'b', 'c'. As explained in the previous section, a string is a collection of characters. To store a string in C, we can create an array and store them in these arrays.
Find elsewhere
🌐
Reddit
reddit.com › r/learnprogramming › [c] can i store strings into an array ?
r/learnprogramming on Reddit: [C] Can I store strings into an array ?
October 5, 2021 -

I know that strings are char arrays already and I was wondering if there's a way to store not strings in an array. It would be like storing arrays into an array and that sounds a bit weird.

As far as I know an array is a pointer so I'd tend to say no, but after all pointers are just storing numbers like any variable.

To maybe be clearer, what I'd want to do is have an array that's like that :

array[0] = BLUE

array[1] = RED

array [2] = YELLOW

etc

🌐
Emory
cs.emory.edu › ~cheung › Courses › 255 › Syllabus › 2-C-adv-data › string.html
Strings in C --- arrays of char
How to run the program: String: array of characters or a (char *) We have just seen that a · string in C is stored as an · array of characters · Fact: Reason: Example: function with a · string variable · Example Program: (Demo above code) &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp ·
🌐
Quora
quora.com › How-can-I-store-a-string-in-a-variable-which-I-printed-by-2-for-loops-in-C
How to store a string in a variable which I printed by 2 for loops in ‘C’ - Quora
Answer (1 of 3): What does the printing have to do with the storing? Why would you use loops to print strings? [code]printf(“%s\n”, theString); [/code]would do fine. About storing strings: in C these are zero terminated. If strings are known at compile time, you can do this: [code]char* pStr...
🌐
Notes
notes.iamdev.in › home › how to store array of strings in c programming
How to Store Array of Strings in C Programming » Notes
July 12, 2024 - #include <stdio.h> #include <stdlib.h> #include <string.h> #define MAX_SIZE 5 // Maximum number of strings in the array #define MAX_LENGTH 50 // Maximum length of each string int main() { char strings[MAX_SIZE][MAX_LENGTH]; // Array of strings int i; // Input strings into the array printf("Enter %d strings (each less than %d characters):\n", MAX_SIZE, MAX_LENGTH); for (i = 0; i < MAX_SIZE; i++) { printf("String %d: ", i + 1); fgets(strings[i], MAX_LENGTH, stdin); // Remove newline character from fgets input strings[i][strcspn(strings[i], "\n")] = '\0'; } // Displaying strings stored in the array printf("\nStrings stored in the array:\n"); for (i = 0; i < MAX_SIZE; i++) { printf("String %d: %s\n", i + 1, strings[i]); } return 0; } ... #include <stdlib.h>: Includes functions related to memory allocation (not extensively used in this example).
🌐
All About Circuits
forum.allaboutcircuits.com › home › forums › embedded & programming › programming & languages
How to store string in c | All About Circuits
January 13, 2020 - Many string functions, such as printf("%s",Name), will continue printing until they run into a 0. If there is no 0 then they will continue on through memory that they shouldn't be reading through. Change your allocation: ... scanf() wants a pointer to a memory location, you're passing it the data that's in the memory location. So to store the first character, you need to pass the address of the location where the first character is to be stored.
🌐
Cprogramming
cboard.cprogramming.com › c-programming › 181726-why-does-char-pointer-store-string-directly-while-pointer-stores-memory-addr.html
Why does a char pointer store a string directly while a pointer stores a memory addr
Studying the whole book and doing all the exercises in each chapter, would prepare you to program in C. I have listed my recommendations many times in this forum. ... what happens if you do printf("%p\n", y) then printf("%p\n", y[1]) are the results different? i think the answer is that strings are effectively arrays so each character is stored at a separate address where as in your example *x points to a single address with the entire integer stored at that address.
🌐
Unstop
unstop.com › home › blog › strings in c | initialization and string functions (+examples)
Strings In C | Initialization and String Functions (+Examples)
May 30, 2025 - First, create a string variable 'message' with a size of 30 characters. Next, we use the printf() function to enter the user message. We then use the scanf() function to read up to 30 characters of input from the user and store it in the message ...
🌐
W3Schools
w3schools.com › c › c_strings.php
C Strings
C Examples C Real-Life Examples C Exercises C Quiz C Code Challenges C Compiler C Syllabus C Study Plan C Interview Q&A C Certificate ... Strings are used for storing text/characters. For example, "Hello World" is a string of characters. Unlike many other programming languages, C does not have a String type to easily create string variables.
🌐
Quora
quora.com › Where-are-strings-stored-in-C
Where are strings stored in C? - Quora
Answer (1 of 3): One issue is the storage of string “constants” (aka literals). Consider: char *p; p = “hello there”; p[5] = ‘@’; it used to be that Unix/C would store the string in the data segment and it would be writable as data should be. However most would think that such data ...