The method you have used is correct or you can try it with C
For example:
printf("Enter your first name");
scanf("%c", &firstname);
printf("Enter your last name");
scanf("%c", &lastname);
printf("%c %c", firstname, lastname);
This code would print the first name and the last name of the person who entered his own name.