Skip to main content

Section 11.6 Practice with scanf()

Check Your Understanding Check Your Understanding

1.

What is the correct way to have the user input an integer and store it in the variable age?
Feel free to use the window below to try out some commands.

admin.....open in new window

  • scanf("%d", &age);
  • Correct
  • scanf("%d", age);
  • Not quite. Try again!
  • scanf("%age", &d);
  • Not quite. Try again!
  • scanf("&age");
  • Not quite. Try again!