gets function in cpp code example
Example: gets in cpp
#include <iostream>
#include <cstdio>
using namespace std;
int main()
{
char str[100];
cout << "Enter a string: ";
gets(str);
cout << "You entered: " << str;
return 0;
}