print backwards using pointers