If "makanan" is food and "makan" is to eat, then "an" is an affix... so pertanya is to ask?
no you have to drop the affix per too.. so it's tanya : to ask.. so the pertanyaan has 2 affix it's per-tanya-an
bertanya is to ask
What about -an with minta? Is mintaan a word or does it have to have a prefix like per and ber?