Step 1: Sort the options by origin and by function:
Ask two things about each pair. Do both organs come from the same structure in a common ancestor? And is the job the same? Same origin means homologous. Same job with a different origin means analogous.
Step 2: Check the options one by one:
Octopus eye and human eye: the octopus is an invertebrate mollusc, and the two eyes developed separately, so they are analogous.
Sweet potato and potato: one is a root, the other is a stem, so they are analogous (both store food).
Penguin and dolphin flippers: these are the same kind of swimming organ in two unrelated animals. NCERT puts this pair among the analogous examples.
Heart of reptiles and mammals: both are the vertebrate heart inherited from one ancestor, with the same basic plan of atria and ventricles. This pair is homologous.
Step 3: Pick the answer:
Only the last pair shares an ancestral origin, so the correct option is the heart of reptiles and mammals.
Step 4: Final Answer:
Option (D) is the example of homologous organs.
\[ \boxed{\text{(D)}} \]