My C++ Quiz

The ultimate place for testing what you have learned



Home | Start Quiz | List of questions  | Next Question | Login / Register

Question #15: Which of the following functions are found when called in main during name lookup?
45% on 2769 times asked

#include <iostream>

namespace standards
{
    struct datastructure
    {
    };

    void foo(const datastructure& ds)
    {
    }

    void bar()
    {
    }
}

int main(int argc, char** argv)
{
    standards::datastructure ds;

    foo(ds);

    bar();

    return 0;
}

foo
bar
foo and bar
neither
© 2007-2010, My C++ Quiz, All rights reserved.
Can you find a bug in the quiz? Can you think of a new question that would be cool to add to this site? Email us and we will take action:
email us
Other Quizes | Contributors