Final answer:
The correct declaration for a function to display an instance of class Foo is a) ostream& operator<<(ostream& os, const Foo& f).
Step-by-step explanation:
The correct declaration for a function to display an instance of class Foo using the << operator is a) ostream& operator<<(ostream& os, const Foo& f). The << operator is used for output stream and it should return a reference to the output stream object to enable chaining of << operators. The const reference to the Foo object allows for accessing the data members of the object without making modifications.