Published on August 27, 2011 by Daniel BÄluÈÄ Tagged: arrays, pointers, strings, .rodata This post will shed some light on the differences between arrays and pointers specifically when it comes about referencing string literals. We will base our discussion on the following two programs: array.c char a[] = "ROSEdu"; int main(void) { a[0] = 'r'; printf("%s\n", a); return 0; } Program array.c defines
{{#tags}}- {{label}}
{{/tags}}