hi,
I'm not sure if I fully understand what you want to make, but maybe you'll find this reply useful anyway.
From what I understand, the vertical axis in your chart represents each question and the horizontal axis prints a number of *s equal to the rating the user gave as answer?
You have 12 lines so I'll assume 12 questions. Let's say the answers to the questions are stored in an array
answer.
You'd read your answers like so:
int answer[12];
printf("Question 1: How often do you use this online service? [1-5]\n");
scanf("%d",&answer[0]);
printf("Question 2: How often do you use this other online service? [1-5]\n");
scanf("%d",&answer[1]);
Now you print the results like so:
for(int i=0;i<12;i++){
putchar('|');
for(int j=0;j<answer[i];j++)>
putchar('*');
putchar('\n');
}
printf("|-----------------------------------------\n1 2 3 4 5\n");
If the vertical axis doesn't mean questions but for example how many people voted a certain score [1-5], you can store these scores in a similar array and print the results much the same way as in this example.