After doing a little research and reading through some of the web articles, I believe echoing input is just more of a fancier way for the program, or in this case, the compiler, to ask the programmer the three simple questions listed below. I will elaborate further in the latter paragraph. But basically, it is a process in which the program, or in this case, an input and output object prompting the user to provide inputs to the compiler to perform calculations, if any, then output the calculated final results as an output.
1. What do you want to do?
Let’s use an integer variable age as an example. So, in this case, the x variable has been declared but not yet initialized or assigned to a value. Let’s assume that we want to assign this X variable to the value of 1. There are a few ways to do it. We could either “hardcode” or force assignment this variable to the value of 1 using the “=” equal sign, or we could use the “cin” command to prompt the user for a value. The action where the program prompts the user to provide a value is input. To echo, or in this case, output that value, all we have to do is by using the “cout” function by typing “cout << x, which would give output and display the value of 1 on our console.
2. Are you done?
However, suppose we don’t want to display the value 1, and instead, we want it to display 5. We would have to add the value 4 to the variable x. In this case, we could use a formula on the bottom of that user input command that says x = x + 4, or we could assign another variable named y and initiate it with the value of 4. In that case, we would just do x = x + y. This calculation process in between the initial input and the subsequent final output is part of the echoing input.
3. If so, what else do you want to do?
Then finally, suppose we want to display our final result. According to what we’ve previously established, all we had to do was type out the same output statement “cout << x”. At this stage, the echoing is complete. Because the program prompted us for a value, in which it calculated, then outputted our desired results. This process is an incredibly simplified version of an echoing input. Basically, it echoed our command and figured everything for us. However, there are cases that we might not want to immediately initialize the variable immediately after declaring it, nor do we want to ask for input. In this case, its final value will be based on some sort of formulaic expression. So with that said, all variables that aren’t initiated, calculated, finalized, and outputted are considered echoing input. To put it simply, the variable is out there in the wild, but it hasn’t been utilized to create a meaningful response.