Rusted threaded end of drain pipe under sink

I just posted about a shutoff valve in my bathroom. This post is about the drain pipe for the sink in the same bathroom. It is metal, (cast iron?, rusted galvanized?). When I removed the old sink and plumbing, it revealed this pipe end (linked photo here). It is rusted on the end with the threads and part of the threads on the bottom are rusted completely off. The pipe slopes slightly downward (into the room), although I'm not sure if that was the case before I removed the plumbing, maybe it was holding it up slightly.

You can probably guess my questions...

1) Can I just attach this to pvc piping using a fernco adapter or something like it?
2) Does the rusted section of the pipe need to be cut off? -if so, best way for a diyer to do so?
3) Even worse, do I need to go into the wall for bigger repairs?

Thanks for the help. I hate the plumbing part, I just want to start laying tile, trim, etc!

It's an iron pipe nipple that is screwed into an iron or cast iron fitting in the wall. If you try to unscrew it, the threads on the fitting in the wall might break off. Then you have to open the wall. If you try to cut the threads off with a saws-all it could break whatever seal is in the wall.

I have unscrewed 'hundreds' of those nipples, at least 40 on a job a few months ago. I had to use a 5' cheater bar on an 18" wrench for some of them but NONE of them broke the fitting and all the threads in the fiittings were intact.

FWIW, before you take that out, put a level on it to see how it is sloped...it should slope down, into the wall slightly. If it goes the other way, you'll have water sitting at the low end and it doesn't work as well. Galvanized should all be removed when doing remodeling if at all possible, and replaced with plastic or cast iron.

quote; Galvanized should all be removed when doing remodeling if at all possible, and replaced with plastic or cast iron.

They do not make cast iron threads nipples. It is probably screwed into a drainage tee which has "automatic" pitch in the thread. This is one location where galvanized should be used. A plastic male thread could snap off.

Thanks everyone, we ended up taking the drywall off the lower half of the wall and replacing the galvanized piping with plastic (ourselves). The galvanized pipe was corroded on the interior with significant hair/rust/etc buildup. In the process we noticed the galvanized piping was slightly sloped the wrong way (both in the wall and after the 90 into the room). We over corrected of course, so the pipe coming out of the wall is sloped upward into the room, which caused a little more work getting the sink drain hooked up, but all done now. Thanks again for the help!