This post is from a low-reputation account and contains an unverified outbound link. Be cautious before clicking external links.

The following C++ program asks the user to type his first name

palhoto(27)
Published in
#dtube
Words
31
Reading
1 min
Listen
Play
7y


The program uses the input operator to display the prompt for the user's name.

The code:

#include iostream
int main(void)
{
char first_name[64];
std::cout << "Type your first name: ";
std::cin >> first_name;
std::cout << "Hello, " << first_name << "!\n";
}


▶️ DTube
▶️ YouTube
The following C++ program asks the user to type his first name | Ecency