Follow whitespace across consecutive reads

A command reader executes the code below with input consisting of 52 Q followed by a newline. Assume all input is available and no input errors occur. Which statements about the calls are true? Select all that apply.


C
int number;
char first, second;
int r1 = scanf("%d%c", &number, &first);
int r2 = scanf(" %c", &second);
Choose an answer

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

More STDIO.H and STDLIB.H Questions: