My C++ Quiz

The ultimate place for testing what you have learned



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

Question #8: Given the code below, the variable y can be accessed in which blocks of code?
47% on 5161 times asked

1  int main(int argc, char** argv)
2  {
3
4   if ( argc > 10) )
5   {
6
7   }
8   else if (int y = argc - 1 )
9   {
10
11  }
12  else
13  {
14
15  }
16
17  return 0;
18  }

lines 4-15
lines 4-17
lines 8-11
lines 8-15
lines 8-17
© 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