Rotate an ASCII art image
C, 336 chars

I'm sure there's room for improvement.

char*a="&lt;^&gt;V|-|-/\\/\\ppdd(())[[]]{{}}MMWW9966",*p,*q;
n,x,y,r;
z(c){
    return(q=strchr(a,c))?a[(q-a&amp;-4)+(q-a+r&amp;3)]:c;
}
#define A(r)(r&amp;3^3?1-r%4:0)*
f(r){
    return A(r)x+A(~-r)y+(r&amp;2)/2*~-n;
}
main(){
    scanf("%d\n",&amp;n);
    p=q=malloc(n*n+1);
    for(y=n;y--;q+=n)gets(q);
    scanf("%d",&amp;r);
    for(r/=90;++y&lt;n;puts(""))for(x=0;x&lt;n;x++)putchar(z(p[f(r)+n*f(r+1)],r));
}