+ 1
How a pointer of data type char having 1byte size stores the address of more size?
3 Respostas
+ 3
Suraj Dhenge Wikipedia will explain this better than me https://en.wikipedia.org/wiki/Word_(computer_architecture)
+ 2
Any pointers type (int*, char*, void* etc) have same machine word size (usually 4/8 bytes) and it store only the ADRESS OF FIRST BYTE OF DATA in memory. In your case, the code allocate an array of char containing the chars "String" then assign to p the adress of first "data" to it (the adress of 'S' char in memory)
+ 1
KrOW what is the size of pointer type in 64-bit machine? 4/8byte?