What functional groups are there in caffeine?
Its IUPAC name is 1,3,7-trimethyl-1H-purine-2,6(3H,7H)-dione 3,7-dihydro-1,3,7-trimethyl-1H-purine-2,6-dione.
When you read this IUPAC name you can see that it is a ketone so it has carbonyl group.
In organic chemistry, a carbonyl group is a functional group composed of a carbon atom double-bonded to an oxygen atom: C=O. It is common to several classes of organic compounds, as part of many larger functional groups.
Also, you can see amine group but they don't have priority,
The functional groups in caffeine are amine and amide.
The structure of caffeine is
Let's look first at the 5-membered ring.
The two N atoms are part of amine groups.
They are both part of the 5-membered system called an imidazole ring.
An imidazole ring is aromatic, like benzene.
Now let's look at the 6-membered ring.
The C=O and N groups look like ketone and amine groups, but they are not.
A C=O next to an N is an amide group.
There are two amide groups in the ring.
So caffeine contains two amine and two amide functional groups.