Question: What is the difference between scanf() and sscanf() functions?

  1. The scanf() function reads data formatted as a string; The sscanf() function reads string input from the screen.
  2. The scanf() function reads formatted data from the keyboard; The sscanf() function reads formatted input from a string.
  3. The scanf() function reads string data from the keyboard; The sscanf() function reads string data from a string.
  4. The scanf() function reads formatted data from a file; The sscanf() function reads input from a selected string

Answer: The correct answer of the above question is Option B:The scanf() function reads formatted data from the keyboard; The sscanf() function reads formatted input from a string.