Doubt in image rotation

i have written code for this working fine.
please show me better code for this if possible like one using lesser memory or something like that!

hi shubham
your code is fine
the steps you have followed are correct(transpose and then reverse every row).