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
String literals are stored in read only section of memory. Any attempt to modify the contents of a string literal invokes Undefined Behaviour (segmentation fault on most implementations).
Use an array of characters rather
char str[] = "HelloGuys";