It depends, specifically on what level you are in and where you are studying, i.e. what regulations you have to play by. Based on that my answer would be somewhere between no and NO! :)
First of all as others have pointed out already, it's extremely disrespectful to waste people's time. Time is a commodity, and a very precious one at that, especially in academic setting. Many professors and lecturers (indeed even TAs) are juggling their own work, assignments, deadlines and lives outside work on a tight balance. To presume that someone has time to entertain your desire to "come by and see how the exam is"; well, quite frankly that's a flagrant 2 in my eyes.
This comes due to some bad time management and some personal problems during the semester.
sh*t happens, it's no big deal to have a bad grade here and there. I know not everyone share's this opinion, but we are all human and when you are at the uni there are a lot of things going on. It's part of the learning process to mess up things every now and then, expectation of, and desire to get, a flawless track record is what gets people into trouble in many cases.
If I were you, I would just take my chances with the exam and do what I can do. If you get a C/D whatever, so be it. If you fail, you can prepare better for the retake.
If you insist you don't want to take your chances, I'd notify the teacher that I cannot take the test for whatever reason, and ask when/how you can register for the retake. If the teacher calls you on your made-up excuse though, you are gonna have to weasel your way out of it though. Thus I recommend you prepare as much as you can, and give your honest best shot.