In a previous post about using sizeof() on string literals, there was an interesting comment by S. Enevoldsen: To better remember this realize that arrays are not pointers, and string literals are arrays (that can decay to pointers). const char arrayVersion[] = “1.0.42-beta”;const char* pointerString = “1.0.42-beta”;printf (“sizeof(arrayVersion) = %dn”, sizeof(arrayVersion));printf …
From: Retro Roundup
