Consider below code:
#include<iostream>
int main() {
char line[256];
std::cin.getline(line, 256);
std::cout << line << std::endl;
}
Upon execution, whatever text we enter, appears twice on the console. Is there a way to overwrite the user entered text with the one cout
ed later.