What is this:
int (*daytab)[13];
What is daytab itself in this case?
What is this:
int (*daytab)[13];
What is daytab itself in this case?
See page 112 of K&R-II (English Edition). Or Chapter 5.7
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
Huh. I thought it was a function pointer array at first (but it's not...)
It's a single pointer to an array of ints. Check this out:Code:int (*func[3])(); func[0] = test; func[0](); // call test()
Code:int x[5] = {1,2,3,4,5}, (*ptr)[5] = &x; printf("%d %d %d\n",(*ptr)[2], sizeof(ptr), sizeof(x));
C programming resources:
GNU C Function and Macro Index -- glibc reference manual
The C Book -- nice online learner guide
Current ISO draft standard
CCAN -- new CPAN like open source library repository
3 (different) GNU debugger tutorials: #1 -- #2 -- #3
cpwiki -- our wiki on sourceforge
"Pointer to an array of 13 integers".
So this sort of pointer can only point to an array that contains strictly 13 integers?
edit, ok i got it now!
Last edited by Tool; 01-17-2010 at 10:26 AM.