I think recognising the style is more important than recognising the actual piece. I'm not sure what grade you're doing or anything, but I found that for early grades it was fairly obvious and for later ones my GCSE and A-level music notes were a real help.
If you don't know, you may as well have a guess, because you may well be right and earn yourself some marks. However, don't worry unduly about this because it's only a couple of marks from the whole exam, and any time worrying too much about it would probably be better spent practicing pieces, scales etc which are worth more.
Good luck