Some people may disagree with me, but I think 350 replaces 340. 350's got a long range and it's extremely fuel efficient (more so than the new 787). 340 is a four engine airliner and it's not fuel efficient at all. That fact alone makes 340 pretty much obsolete. Operating costs for both 787 and 350 is probably much less than 340 (totally speculating here) so it's hard to justify operating 340s when there are much better airliners out there that can save you a lot of money in the long term. Operating other 4 engine airliners like 747 and 380 is justifiable because they carry way more people than 340 does AND their new models (380 is already a new plane and 747 has gotten an upgrade) are fuel efficient as well.
340s are already out of production and I'm pretty sure it's gonna be rare to see one of them in the skies over time. Which is a shame. I like 340s.
747's are being phased out in passenger service, actually. The larger 777 variants can carry almost as many (~375 for a 777-300 vs 415 for a 747-400), while being more efficient. The current 747 fleet is rapidly being transitioned by most operators into freighter roles.
Doesn't really replace much. I'd say the A330, as it's a twin, and wide-body. In fact, it's called 'XWB', standing for 'extra wide body'.
Better fuel consumption and better cabin for passengers. That's pretty much everything these days… B787/B737MAX, and A350XWB/A320NEO for the two big players for new generation (aside from B777-300ER and B747-800 as "renewed classics" for Boeing, and A380 and A330 for Airbus).
Depending upon configuration, it competes with the upper range 767/777/787s. http://i.minus.com/ibue0fziZTMd11.jpg shows the comparisons pretty well, as far as size alone is concerned.