In this case how do we know the ending will be masculine accusative, and not feminine or neuter?
That depends on what you are talking about. If you’re referencing a dog, then it will be masculine, a purse neuter and a girlfriend feminine. You’d not put this sentence out without a proper point of reference.
That’s what I thought too. Danke.