c - Is the default address of an undefined array always a valid address? -


this question has answer here:

in system, undefined pointer has default value of 0x00000000.

void demo() {     char cdata;     char *pexampleptr;     char pexamplearray[4];      &cdata <--- address 0x12345678     pexampleptr  <--- value of pointer 0x00000000     pexamplearray[0] <--- address ??? } 

what default address of pexamplearray? 0x00000000 or have valid address cdata?

the pointer pexampleptr indeed have valid address. maybe meant is not pointing , hence 0x00000000 that's not case.

also in regards pexamplearray[4], array, not pointer , indeed have vaild address case first variable.


Comments