Answer:
void main(){
string name;
printf("Enter Name\n");
stdin("%s",&name);
Printf("\nGreetings %s",name);
}
Explanation:
Here scanf is represented by stdin and we are using that scanner object to read the string value from user.The value which we read are printed in a new line using printf .The format specifier %s in printf is replaced by name variable