Why does it say \"Memory access violation\"?
char* str = \"HelloGuys\"; int len = strlen(str); for (int i=0; i<(len/2); ++i){ char t = str[l
To fix this, use an array instead of a pointer to read-only memory:
char str[] = "HelloGuys"; // change this line int len = strlen(str); for (int i=0; i<(len/2); ++i){ char t = str[len-i-1]; str[len-i-1] = str[i]; str[i] = t; }