On Tue, 21 Nov 2023 at 02:31, André Albergaria Coelho via Gcc <gcc@gcc.gnu.org> wrote: > > Hello
Hello, This mailing list is for discussing the development of GCC itself, not for help with basic C programming. Please use the gcc-h...@gcc.gnu.org list for this kind of thing, or a general C programming forum. Thanks, Jonathan > > #include <stdio.h> > > void func(char *ptr) { > printf("\n%i",sizeof(ptr)); > } > > int main(void) { > char arr[10]; > printf("\n Sizeof arr %i",sizeof(arr)); > func(arr); > > return 0; > } > > /* sizeof(arr) != sizeof(ptr), but they point to same thing. */ > > > So problem. On main, arr has size 10, while on func, arr has size 8. But > they are equal. > > > -- > André Albergaria Coelho > andrealberga...@gmail.com