What is the memory allocated by the following definition ?
Re: c/c++ programming
Well, you would assume that x would be a line of ten integers, but it's not. * declares it as a pointer. All pointers are DWORDs, meaning that they are 32 bit variables (on the x86 instruction set). Each 32 bit variable is 4 bytes and it holds a value up to 0xFFFFFFFF, or 4,294,967,295. 10 of then would be 40 bytes, and that is how much is allocated.