Human epidemiological studies have provided compelling evidence that prenatal exposure to stress is associated with significantly increased risks of developing psychiatric disorders in adulthood. Exposure to excessive maternal glucocorticoids may underlie this fetal programming effect. In the current study, we assessed how prenatal dexamethasone administration during the last week of gestation affects stress reactivity and cognition in adult offspring. Stress reactivity was assessed by evaluating anxiety-like behavior on an elevated plus maze and in an open field. In addition, to characterize the long-term cognitive outcomes of prenatal exposure to glucocorticoids, animals were assessed on two cognitive tasks, a spatial reference memory task with reversal learning and a delayed matching to position (DMTP) task. Our results suggest that prenatal exposure to dexamethasone had no observable effect on anxiety-like behavior, but affected cognition in the adult offspring. Prenatally dexamethasone-exposed animals showed a transient deficit in the spatial reference memory task and a trend to faster acquisition during the reversal-learning phase. Furthermore, prenatally dexamethasone-treated animals also showed faster learning of new platform positions in the DMTP task. These results suggest that fetal overexposure to glucocorticoids programs a phenotype characterized by cognitive flexibility and adaptability to frequent changes in environmental circumstances. This can be viewed as an attempt to increase the fitness of survival in a potentially hazardous postnatal environment, as predicted by intrauterine adversity. Collectively, our data suggest that prenatal exposure to dexamethasone in rats could be used as an animal model for studying some cognitive components of related psychiatric disorders.