The Holy Quran is the fountainhead of all guidance and is free of all defects and contradictions. Allah Ta'ala says:
Praise be to Allah Who hath sent to His Servant the Book, and hath allowed therein no Crookedness. Surah Kahf (18:1)
No contradiction in the verses of the Holy Quran
Those who did not believe in the Holy Prophet (Sallallahu alaihi wa sallam) had objected that the Holy Prophet (Sallallahu alaihi wa sallam) was presenting the Holy Quran after writing it Himself. Allah Ta'ala said that, this the "Ghaib" (unseen), which we are revealing (Wahi) to you, O Beloved!
Some verses of the Holy Quran say that the Holy Prophet (Sallallahu alaihi wa sallam) does not the unseen (Ilm Ul Ghaib) and some verses say that the Holy Prophet (Sallallahu alaihi wa sallam) is not ungenerous in giving the knowledge of the unseen (Surah Takweer-24). This is not a contradiction, but this truth is being clarified that the Holy Prophet (Sallallahu alaihi wa sallam) does not know the unseen without Allah Ta'ala revealing it to Him and this Holy Quran is also a spring of the knowledge of the unseen. He did not write it, but We revealed it to Him, so the knowledge of the unseen, which Our Beloved has is through Our grant and instruction. Thus, consider His words, Hadith and explanations as Our instruction. Do not doubt even the least portion of it, as the Hadith and Sunnah is based on truth.
These are the words of Mufti Syed Ziauddin Naqshbandi Qadri, Naib Shaykh Ul Fiqh, Jamia Nizamia and Founder/Director Abul Hasanaat Islamic Research Center. Abul Hasanaat Islamic Research Center in the weekly lecture at Masjid Abul Hasanaat, Jahanuma, Hyderabad.
The Hadith also support this
Mufti Sahab said that the verses of the Holy Quran and the Hadith mentioned in the Sihah Sittah (the 6 books of Hadith containing the most rigorously-authenticated Hadith), testify to the truth that Allah Ta'ala has granted the knowledge of the unseen and the divine knowledge (Ilm Al Ladunniya) to the fullest possible extent. Many incidents are mentioned even in the books of Seerah.
What are you thinking of?
It is mentioned in Subul Ul Huda war Rashad that on the occasion of the conquest of Makkah, the Holy Prophet (Sallallahu alaihi wa sallam) was performing Tawaf that a person called "Fadhala," came closer to Him and thought that this is a good chance to martyr the Holy Prophet (Sallallahu alaihi wa sallam) "May Allah (Subhanahu Wa Ta'ala) protect us from this." The Holy Prophet (Sallallahu alaihi wa sallam) asked him: What are you thinking? He said: I was doing the Dhikr of Allah Ta'ala. The Holy Prophet (Sallallahu alaihi wa sallam) smiled at this and said: Repent before Allah Ta'ala for that evil scheme, which you had. Then the Holy Prophet (Sallallahu alaihi wa sallam) kept His hand on his chest and there came a revolution in His being. Enmity was replaced with love. He says: By Allah (Subhanahu Wa Ta'ala)! The Holy Prophet (Sallallahu alaihi wa sallam) had not even removed His hand from chest, that my heart became such that out of the whole universe, the Holy Prophet (Sallallahu alaihi wa sallam) became most beloved to me.
What about that wealth, O Abbas?
It is given in Sunan Kubra that on the occasion of the Battle of Badr, the Holy Prophet (Sallallahu alaihi wa sallam) asked His uncle Hadhrat Abbas (May Allah be well pleased with him) to pay his ransom. He said: I don’t have any money to do so. Then the Holy Prophet (Sallallahu alaihi wa sallam) said: Where is that wealth, which you and aunt Ummul Fadhl had buried and you had told him, if I die in this journey, then this will be for my sons Abdullah and Qutham?
When Hadhrat Abbas (May Allah be well pleased with him) heard this, he said: O Prophet of Allah (Sallallahu alaihi wa sallam), I know and believe that You are the true Prophet of Allah (Subhanahu Wa Ta'ala). By Allah Ta'ala! This was not known to anybody except me and my wife Ummul Fadhl.
How will that time be, O Suraqa?
In the same way, in the Hijrah, when Suraqa Bin Malik came to martyr the Holy Prophet (Sallallahu alaihi wa sallam), the Holy Prophet (Sallallahu alaihi wa sallam) pardoned him and said: O Suraqa, how will that time be when the bangles of Kisra (Chosroe, ruler of Persia) will be in your hands.
This was expressed in the time of the caliphate of Hadhrat Umar (May Allah be well pleased with him), when the kingdom of Iran was conquered. The golden bangles of the Chosroe of Persia also came in the war booty. Hadhrat Umar (May Allah be well pleased with him) gave these to Hadhrat Suraqa (May Allah be well pleased with him).
In this way, the world saw the fulfillment of this prophecy.