Problem: Write a C program to create an array of string.

C language has no ‘string’ datatype, so we usually store a string value as characters in a char array.

The above char array in C can store only one string value.

So, how to store multiples string values in C?

The solution for this is to create an array of char array.

The above statement creates a string array which can store up to ‘size’ number of elements, each of length 30.

Let’s see how to implement this in C Program.

String Array in C

Output

String Array in C

In this tutorial, we learned to create an array of string in c programming language.

Leave a Reply