Which lines contain errors (compilation errors, runtime errors, undefined behavior etc.), if any?

    char a[] = "123";  //1
    char b[5] = "123";  //2
    const char *c = "123";  //3
    a[3] = '3';  //4
    b[4] = '3';  //5
    c[2] = '5';  //6

Topic Statistics

25%

  • 75Right (%)
  • 25Wrong (%)
to get statistics

Follow Quizful

Send Feedback
or join Alpha test group