The code initializes a pointer `ptr1` to point to the string "abcdef". The expression `ptr1 = ptr1 + (strlen(ptr1)-1)` moves the pointer to the last character of the string, which is 'f'. 
In the first `printf` statement, `--*ptr1--` decrements the value of 'f' to 'e' and then moves the pointer to the previous character, 'e'. 
In the second `printf` statement, `--*--ptr1` first moves the pointer to the previous character, 'd', and then decrements its value to 'c'. 
In the third `printf` statement, `--*(ptr1--)` decrements the value of 'c' to 'b' and then moves the pointer to the previous character, 'a'. 
In the fourth `printf` statement, `--*(--ptr1)` first moves the pointer to the previous character, 'a', and then decrements its value to 'a'. 
Finally, in the fifth `printf` statement, `*ptr1` simply prints the value of the current character, which is 'a'. 
Therefore, the output of the code is "ecbaa".