How many bytes of memory is allocated when you declare: double* p1[10];

Recommended Answers

At a minimum, 10xsizeof(double*). The size of a pointer depends upon whether you are running in 32-bit or 64-bit mode. The easy way to tell is to execute the function/macro sizeof(p1).

Jump to Post

All 3 Replies

At a minimum, 10xsizeof(double*). The size of a pointer depends upon whether you are running in 32-bit or 64-bit mode. The easy way to tell is to execute the function/macro sizeof(p1).

Thanks! I figured it out.

function/macro sizeof(p1)

sizeof is not a function or a macro it is an operator.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.