I had a quiz and I failed because I wrote that 9.45 was "forty-five past nine" instead of "quarter to ten". I think it should have been accepted by my teacher. I searched the Internet and I found the possibility of saying so. Is it correct to say "it is forty-five past nine"?
Just because someone has written it on the internet does not make it correct.
In English speech, times up to "half-past" the hour are "past"; after that they are "to" the next hour.
When writing times in figures it's not possible to indicate "to the next hour", so with figures it's always written like "9:45". To say the time you either read it as "nine forty-five" or convert it to "a quarter to ten".
There is one very specific exception, when talking of timetables. A train which occurs at (say) 9:47, 10:47, 11:47 etc. might be said to leave at "forty-seven minutes past the hour". But this is only used for this specific timetable instance; and note that the word minutes is used — it's never just "forty-seven past ten".
[Note that American English can also use "of" instead of "to".]
In the US the younger generation is getting away from the "quarter of" format. They see almost all times as digital. So they see it in the lower corner of the computer screen, in the center of their smart phone, and in text messages or tweets. Sometimes I have even had to clarify that "Five of ten" is the same as 9:55. Also the "X of format" doesn't work with the 24 hour or military time system, nobody says "quarter of Fifteen-hundred".
In the United States "Nine Forty-Five" would have been the best answer.
Forty-five past nine is not wrong, but, in classic computer hacker jargon, it is non-canonical. That is to say, it is contrary to the usual or standard manner.