Question:

In namespace foo, the function bar can access the variable x also declared in namespace foo?

#include <iostream>

namespace foo
{
    void bar()
    {
        x++;
    }

    int x;
}

int main(int argc, char** argv)
{
    return 0;
}

Answers:


Keywords:

© 2017 QuizBucket.org