string initialization

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I want to initialize staticly a string like this:
"abc\0defg\0hi\0"

if I define:
char *str[] = {
"abc",
"defg",
"hi" };

can I be sure that the 3 strings are placed consecutively? 
In this way I declase an array of strings. There is another way to avoid
this?

thanks

-- 
Massimiliano Cialdi
cialdi@xxxxxxxxxxx
m.cialdi@xxxxxxxx

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux