Can anyone tell me the difference (if any) of the following (memory wise) of using const * vs char *:
Thanks.Code:#include <conio.h> #include <stdio.h> #define GET_NUM_ELEMENTS(x) (sizeof(x) / sizeof(x[0])) int main(void) { const char *cStr = "Stuff"; char *str = "Stuff"; const char *cStrArray[] = { "Um", "Some", "Words" }; char *strArray[] = { "Um", "Some", "Words" }; for(register unsigned int i = 0; i < GET_NUM_ELEMENTS(StrArray); i++) printf("%s ", strArray[i]); getch(); return 0; }