My C++ Quiz

The ultimate place for testing what you have learned



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

Question #63: Which lines below should not compile?
58% on 1004 times asked

1 struct A
2 {
3    A(int x) : n(x) {}
4    int n;
5 };
6
7 int main(int argc, char** argv)
8 {
9    A a1;
10   A a2(2);
11   A a3(a2);
12   return 0;
13 }

none
9
10
11
9 and 10 and 11
© 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