So, since it is "roter", it can be deduced that the article for "Apfel" is "der".
ok, can someone please clarify the rules for "rote and "roter' and so forth? like why use rote here?
Here, we use 'roter' and the endings of these adjectives are due to the gender of the noun. For example, for a neuter noun we would use 'rot', feminine we use 'rote' and masculine we use 'roter'