+ 2
Sizeof
Sizeof('3') = 4 How ?
9 ответов
+ 5
✳AsterisK✳ that mean sizeof operator do type-casting if data type is not defined?
+ 5
Any non-specified numeric value is an int, if it has a decimal point is a double. Then when you put this value in a variable C does a non-warning implicit cast.
And that's why any library function has his one-character arguments like int, it doesn't waste computing time doing casts and with memory align.
+ 4
the ascii characters are integer values, which range from 1-128 this values are integers disguised a char, which in other words means its an integer value, ascii value of 3 is 51 its just like doing sizeof(51) which is an int
+ 3
'3' is converted to the ASCII value and being a 64-bit Machine int is 4 bytes in your system
+ 2
Because int is 4 bytes.
+ 2
Drissa Sidibe imagine a white paper tape, on it you can write whatever you want, but to understand something you cannot overlap information. This tape has a finite size so if you write many things on it you can run out of space to put others.
That is dynamic memory, an area of memory that is left to the programmer to put in it what he wants. What is in memory will remain between function calls and between blocks of code. Is the responsibility of the programmer to erase the unnecessary or, in languages that has garbage collector, of this functionality.
+ 1
Hi! Can someone help me to understand "dynamic memory" concept? Thanks!
+ 1
Ok! Thanks you very for yor help fuster sancho !
0
i don't know how it works Internally, am trying to look it up but can't find something genuine maybe ~ swim ~ can help us out