Is buying and storing gold bars for profit permissible or prohibited?
Buying and storing gold bars for profit is permissible, and there is no harm in it. And Allah The Almighty Knows Best.
What should a praying person who doubts having offered one, or two prostrations in the third Rakah (unit of prayer) do?
Whoever has doubts about their prayer should consider what is less i.e. the above person should offer another Sajda (prostration) and complete his/her prayer, then offer Sujood As-Sahw (prostration of forgetfulness). And Allah Knows Best.
Does passing wind from the anus affect ritual purity?
Ablution is nullified by the passing of wind from the anus, but washing the anus is not required as wind leaves no impurity.
Is wearing a cap permissible for boys, or girls?
All Perfect Praise is due to Allah, The Lord of The Worlds.
In principle, anything is permissible sol long as there is no Sharia evidence prohibiting it, thus wearing the cap by boys is permissible as long as it isn`t done in imitation of the disbelievers. Moreover, a Muslim woman should avoid all that which attracts the attention of men because whatever leads to the forbidden is forbidden. And Allah Knows Best.