are many people said that "Declarations" allocate memory
But in some books it is written that once you declare a variable, you allocate some space for that variable
I tested it too by using pointers
And i saw that Declaration allocates memory
Why is there this disagreement?
how did you declared it? how did you see that memory is allocated?
Well, i used pointer int num; int *p; p=# printf("%p", p) Shows me the address of "num" variable maybe this is not the right way to do that? Or maybe im confused and "int num;" is actually a "definition" I don't know🤦♂
https://www.geeksforgeeks.org/difference-between-definition-and-declaration/
Обсуждают сегодня