1.

Write a C++ program to accept and print your name.

Answer»

#include

using namespace std;

int main()

{

charname[5];

cout<<“Enter your name:”; cin >>name;

cout<< “My name is”<< name;

}

Output:

Enter your name: PRIYA

My name is PRIYA



Discussion

No Comment Found