Podcast
Questions and Answers
What happens when scanf() encounters whitespace, newline, or EOF?
What happens when scanf() encounters whitespace, newline, or EOF?
- It skips a line
- It continues reading
- It stops reading (correct)
- It terminates the program
What is the purpose of using %[^
]s inside scanf()?
What is the purpose of using %[^ ]s inside scanf()?
- To stop reading at newline or EOF
- To skip a line
- To read only numeric inputs
- To read entire string (correct)
What is the difference between scanf() and gets()?
What is the difference between scanf() and gets()?
- gets() is used for any datatype, scanf() for string input
- scanf() is used for numeric input, gets() for string input
- scanf() is used for any datatype, gets() for string input (correct)
- gets() is used for numeric input, scanf() for string input
What is the purpose of Exercise 3?
What is the purpose of Exercise 3?
What should the output of Exercise 3 be?
What should the output of Exercise 3 be?
What is the difference between Exercise 3 and Exercise 4?
What is the difference between Exercise 3 and Exercise 4?
What is the purpose of Exercise 4?
What is the purpose of Exercise 4?
What should the output of Exercise 4 be?
What should the output of Exercise 4 be?
What is the topic of the next lecture?
What is the topic of the next lecture?
What does the newline character do?
What does the newline character do?
Flashcards are hidden until you start studying