Here's a real simple version of how to do this.
Hope it helps.
Code:
#include <stdio.h>
#include <stdlib.h>
#include <conio.h>
int main(void)
{
char ans='\0';
char name[BUFSIZ];
char age[BUFSIZ];
char input[BUFSIZ];
do
{
clrscr();
puts("");
// get the name
printf(" Enter your name:");
if(fgets(input,BUFSIZ,stdin)!=NULL)
{
sscanf(input, "%s", name);
}
// get the age
printf(" Enter your age:");
if(fgets(input,BUFSIZ,stdin)!=NULL)
{
sscanf(input, "%s", age);
}
printf("\n name is %s", name);
printf("\n age is %s\n", age);
printf("\n type y if this is correct, n if wrong <>");
if(fgets(input,BUFSIZ,stdin)!=NULL)
{
sscanf(input, "%c", &ans);
}
} while(ans!='y');
return EXIT_SUCCESS;
} // end int main(void)