By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,663 Members | 762 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,663 IT Pros & Developers. It's quick & easy.

String Array

P: 4
Hi All...

how can i put strings in an array???
i want to put list of items in an array in a C program.
please write format.

Thanks
Aug 13 '07 #1
Share this Question
Share on Google+
2 Replies


Expert 10K+
P: 11,448
Hi All...

how can i put strings in an array???
i want to put list of items in an array in a C program.
please write format.

Thanks
Well, the array would be the buffer in which strcpy(), strcat() and sprintf() would
put their output. It's up to you what and how you want to use that buffer.

kind regards,

Jos
Aug 13 '07 #2

weaknessforcats
Expert Mod 5K+
P: 9,197
C strings are arrays of char.

An array name is the address of element 0.

So, the string name is the address of a char.

So, you need an array of addresses of char.

Enough hints.
Aug 14 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.