Uploaded September 2026 | Updated November 2026, 1 day ago
Learn how to create and use an Array of Strings in C programming using a Two-Dimensional Character Array.
In this tutorial, we first understand why a Character Array can store one String and how a Two-Dimensional Character Array can be used when we need to store multiple String values under one Array Name.
You will learn how to declare an Array of Strings by specifying the number of Strings and the space available for each String. We then initialize the 2D Character Array using individual characters as well as String Literals and understand why enough space must be available for the String Termination Character.
We also visualize the Array of Strings in terms of Rows and Columns. Each Row stores one String, while the Columns store the individual characters of that String. Since all rows in a Two-Dimensional Array have the same number of columns, some space may remain unused when Strings have different lengths.
Next, we use printf() with %s to access and display individual Strings and %c with Row and Column indexes to access a specific Character. We also use a For Loop to display all the Strings stored in the Array.
Then we take User Input for multiple Strings using scanf() and a Scanset. We limit the number of characters that can be read so that space remains for the String Termination Character. We also see how leading whitespace in the scanf() format string can discard leftover whitespace such as the Newline Character between successive inputs.
Finally, the tutorial introduces the idea of creating a Variable Length Array of Strings by taking the number of names and the maximum name length from the user.
Our Website
LearningLad.com
Social Media
Facebook facebook.com/LearningLad
Twitter twitter.com/LearningLadEdu
Instagram instagram.com/LearningLadOfficial
Learn how to create and use an Array of Strings in C programming using a Two-Dimensional Character Array.
In this tutorial, we first understand why a Character Array can store one String and how a Two-Dimensional Character Array can be used when we need to store multiple String values under one Array Name.
You will learn how to declare an Array of Strings by specifying the number of Strings and the space available for each String. We then initialize the 2D Character Array using individual characters as well as String Literals and understand why enough space must be available for the String Termination Character.
We also visualize the Array of Strings in terms of Rows and Columns. Each Row stores one String, while the Columns store the individual characters of that String. Since all rows in a Two-Dimensional Array have the same number of columns, some space may remain unused when Strings have different lengths.
Next, we use printf() with %s to access and display individual Strings and %c with Row and Column indexes to access a specific Character. We also use a For Loop to display all the Strings stored in the Array.
Then we take User Input for multiple Strings using scanf() and a Scanset. We limit the number of characters that can be read so that space remains for the String Termination Character. We also see how leading whitespace in the scanf() format string can discard leftover whitespace such as the Newline Character between successive inputs.
Finally, the tutorial introduces the idea of creating a Variable Length Array of Strings by taking the number of names and the maximum name length from the user.
Our Website
LearningLad.com
Social Media
Facebook facebook.com/LearningLad
Twitter twitter.com/LearningLadEdu
Instagram instagram.com/LearningLadOfficial










