Question:

For the code below which lines should be reported as errors by a compiler?

int main(int argc, char** argv){

  const char* foo = "wow";           // line 1
  foo = "top";                       // line 2
  foo[0] = 1;                        // line 3

  return 0;
}

Answers:


Keywords:

© 2017 QuizBucket.org