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:
Output will be displayed as:
Rs. 20,000 US$ 300
Today: Rs. 10,000 US$150
Course Duration: 30 hrs
Posted on: February 5, 2009 If you enjoyed this post then why not add us on Google+? Add us to your Circles