ProgrammingVery hard

char s[] = "12abc"; char *end; long v = strtol(s, &end, 10); printf("%c", *end); What is printed?

  1. A. 1
  2. B. 2
  3. C. a
  4. D. b

Correct answer: C. a

strtol converts the leading digits 12 and stores a pointer to the first unconverted character in end. That character is 'a'.

More C Programming questions

Exams that ask this topic