431,757 Members | 1,990 Online + Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,757 IT Pros & Developers. It's quick & easy.

# how does one write: sizeof(array of 5 "pointers to double")

 P: n/a Hi! Q. 1) How does one write: sizeof(array of 5 "pointers to double") ??? I know that sizeof(pointer to an array of 5 doubles) can be written as: sizeof(double (*)); Q. 2) Why does this work: int main(void) { double array_of_5_double[] = {0.5, 1.5, 2.5, 3.5, 4.5}; double *X = \ {&array_of_5_double, /* array_of_5_double */ \ &array_of_5_double, \ &array_of_5_double, \ &array_of_5_double, \ &array_of_5_double}; return 0; } but this NOT WORK int main(void) { double array_of_5_double[] = {0.5, 1.5, 2.5, 3.5, 4.5}; double *X; X = \ {&array_of_5_double, /* array_of_5_double */ \ &array_of_5_double, \ &array_of_5_double, \ &array_of_5_double, \ &array_of_5_double}; return 0; } ???? How can the bottom code snippet be written? Thanks. -anon.asdf Aug 12 '07 #1 