In Persian langauge there are two letters which have same pronounciation when spelled with vowels, they are غ andق, in Arabic there is aslo a 'ق', i want to know do the two 'ق' have the same or similar way of pronounciation as a consonant in Arabic and Persian?
Hi In Persian(Farsi) they have exact same pronunciation, but in Arabic they have different pronunciation, "ق" will be pronounced same as it is in Persian, but the other one which is "غ" is different.
These links may help.
As others have mentioned, the two letters have close but distinct pronunciations in Arabic, but the two letters have the same pronunciation in Farsi.
In Arabic, both letters correspond to "throat-y" sounds, but 'ق' corresponds to a 'k' sound while 'غ' corresponds to a 'gh' sound. In Farsi, both letters correspond to a 'gh' sound because Farsi does not have a throaty 'k' sound. Technically speaking, 'غ' and 'ق' in Arabic correspond to two phonemes, while the two letters correspond to the same phoneme in Farsi.
The words "Iraq"/"عراق" and "Baghdad"/"بغداد" exemplify the distinction between 'غ' and 'ق'. A Farsi speaker will pronounce both the 'q' and 'gh' as a guttural 'gh', but an Arabic speaker will pronounce them differently (as specified above). "Qatar" is as another example.
Other mismatched honeme/letter pairs between the Farsi language and its Arabic-based script exist as well, such as 'ث' and the numerous 'z' consonants. In Farsi, 'ث' corresponds to 's' just as 'س' and 'ص', but the Arabic 'ث' corresponds to a soft 'th' (like in the English word "thought"). That's why Farsi and Turkish speakers pronounce Ottoman as "Osman" while Arabic speakers pronounce it as "Uthman". The hard 'th' equivalent (like in the word "that") is in the letter 'ذ'. In Farsi, 'ذ' is annoyingly just another 'z', but 'ذ' is 'th' in Arabic.
You can use this strategy to distinguish the origin of many Farsi words (Persian vs Arabic) but not always. If I remember correctly, Farsi used to have the soft 'th' sound, hence "gozasht"/"گذست".
Other Linguistics SE experts, please point out how I can improve my answer. I'm an aerospace engineer with an interest in linguistics, so I understand some of the basic concepts not not their technical vocabulary.