The sentence "I don't know why he did that" is not a compound sentence but a complex sentence.
The types of sentences are identified using the conjunction in the statement. If the conjunction acts as a coordinator, then it will be a compound sentence. Similarly, if the conjunction acts as a subordinator, then it will be a complex sentence.
A compound sentence has two clauses where the first clause is dependent on the second sub-ordinate clause.
In the statement, "I don't know why he did that", the conjunction 'why' is used to join both the sentences.
The clauses are "I don't know why" and "He did that", where the first clause I don't know why is totally dependent on the second one.
Thus, the sentence will be complex in nature.
To know more about compound sentence here
https://brainly.com/question/10606352
#SPJ9