C++ Program to Scan and Print String

C++ Program to Scan and Print String

Write C++ Program to Scan and Print String

// CPP  Program to Scan and Print String

#include <iostream>

using namespace std;

int main()
{
	char S[50];

	cout << "Enter the String :--> ";
	cin >> S;

	cout << "You Entered :--> " << S;

	return 0;
}

Output:

Enter the String :--> CodeCrucks
You Entered :--> CodeCrucks