In this section you will learn how to create an array of string in C.
A String is an array of char objects. An array of string can be declared and handled like a 2d(two
dimensional) arrays. You can see
in the given example that we have declare a 2 dimensional character array
consisting of three 'rows' and twelve 'columns'. The array is initialized with
three character strings. In C, a format specifier %s is used with the printf to
print the string.
Here is the code:
ARRAYSTR.C
#include <stdio.h>
|
Output will be displayed as:
ARRAYSTR.EXE

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.
Ask Questions? Discuss: C Array of String View All Comments
Post your Comment