Write a code that takes a word from user for C using visual
Solution
#include <iostream>
using namespace std;
int main()
{
string word;
cout<<\"Enter the word: \";
cin >> word;
cout<<\"Word entered: \"<<word<<endl;
return 0;
}
Output:
sh-4.2$ g++ -o main *.cpp
sh-4.2$ main
Enter the word: Hello
Word entered: Hello
