0
0
C++programming~5 mins

Why input and output are required in C++ - Quick Recap

Choose your learning style9 modes available
Recall & Review
beginner
What is the purpose of input in a program?
Input allows a program to receive data from the user or another source so it can process or use that data.
Click to reveal answer
beginner
Why do programs need output?
Output shows the results or information from the program to the user or another system, making the program useful.
Click to reveal answer
beginner
Give a real-life example of input and output in programming.
Typing your name (input) and seeing a greeting message on the screen (output) is a simple example.
Click to reveal answer
beginner
What happens if a program has no input?
Without input, the program cannot get data to work on, so it might always do the same thing or nothing useful.
Click to reveal answer
beginner
What happens if a program has no output?
Without output, the user cannot see the results or information from the program, so it is hard to know if it worked.
Click to reveal answer
Why is input important in a program?
AIt displays results to the user
BIt provides data for the program to process
CIt stores data permanently
DIt makes the program run faster
What does output do in a program?
AShows results or information to the user
BDeletes old data
CReceives data from the user
DSaves data to a file
If a program has no input, what is likely to happen?
AIt will run faster
BIt will crash immediately
CIt will produce random output
DIt will always do the same thing
Which of these is an example of output?
AUser clicking a button
BUser typing a number
CProgram printing a message on screen
DProgram reading a file
Why do programs need both input and output?
ATo get data and show results
BTo run faster and use less memory
CTo store data and delete files
DTo connect to the internet
Explain why input and output are essential for a program to be useful.
Think about how a program talks with people.
You got /3 concepts.
    Describe a simple example where a program uses input and output.
    Imagine a calculator or greeting program.
    You got /3 concepts.