Pointers to arrays in C

Paul Dietz dietz%slb-doll.csnet at CSNET-RELAY.ARPA
Thu Apr 3 04:44:37 AEST 1986


I don't remember if this was mentioned, but you can have pointers
to arrays in C without declaring multidimensional arrays.  For example,
the program

	main()
	{
	    int (*x)[10];
	    printf("%d\n", sizeof(*x));
	}

prints 40 (on a VAX).  x doesn't point to anything, though.



More information about the Comp.lang.c mailing list