Answer:
#include<iostream>
using namespace std;
int main(){
char str[20];
int i=0;
std::cout<<"Enter a name:" ;
cin>>str;
cout<<*str;
while(str[i]!='\0'){
if(str[i]==' '){
i++;
cin>>*(str+i);
}
return 0;
4.7m questions
6.1m answers