📌  相关文章
📜  如何在 - C 编程语言代码示例中设置指向偏移量的指针

📅  最后修改于: 2022-03-11 15:04:44.480000             🧑  作者: Mango

代码示例1
char *ptr0 = "Hello Goodbye";
char *ptr1 = ptr0+6; // offset 6 bytes from ptr0
printf("ptr0: %s\n", ptr0); // expected output ptr0: Hello Goodbye
printf("ptr1: %s", ptr1);   // expected output: ptr1: Goodbye