There is no hidden pointer arithmetic, but I suspect you want a more detailed answer.
If you have a function:
void foo() {
char * bar = "Hello World";
}
There are actually two pieces of memory:
- -, 12 "Hello World" (1 NULL ). . ( ) ( segfault).
- - ,
bar. foo(), (4 32 ) . , foo().
, :
bar = "Good bye";
"Hello World" "Good bye". 3- "Good bye" ( ), (bar) , .
"" ( ) :
void foo() {
char bar[] = "Hello World";
}
, (, ). , , , ( "Hello World" + ), .
, gcc -S test.c, test.s.
- C.
, , , , , , ( ).