The doctor advised me to give up sweets.

A)
The doctor advised to give up sweets me
B)
To me give up sweets was advised by doctor.
C)
I was advised to give up eat sweets by the doctor.
D)
I was advised by the doctor to give up sweets.

Correct Answer :   I was advised by the doctor to give up sweets.