#include<stdio.h>
#include<stdlib.h>
#define size 20
size_t getsize(float *ptr);
int main(void)
{
float array[size];
printf("the number of bytes in the array is %u""\nthe number of bytes returned bt getsize is %u\n",sizeof(array),getsize(array));
}//end main
size_t getsize(float *ptr)
{
return sizeof(ptr);
}
運算出來the number of bytes in the array is 80為什麼, float為啥是4 float array[size]--4*20
另外%p是將16禁制列印出來?