how can we make typing tutor software in c language. plz guide me.

8 Years
Discussion Span
Last Post by Adak
Featured Replies
  • 1
    Salem 5,138   8 Years Ago

    Well if you ask someone to type "please", and they type in "plz", do you tell them they're right or wrong? [url]http://www.catb.org/~esr/faqs/smart-questions.html#writewell[/url] Which operating system and compiler are you using? What sort of C programming skill do you already have? Read More


thanks for your reply.i m just a beginner in C language it is one of my vacation project and i have no idea how to make a typing tutor in c language .i m using turbo c compiler with ide envoirnment.


the operating system for turbo c language is ms dos


you have "no clue" ??

okay, well first thing: how is this typing tutor supposed to work? what's your plan?

I'd think theres a few overall requirements....

(1) print some text to the screen that the person should type.
(2) start a timer, and begin collecting typed input.
(3) once they indicate they have stopped typing, stop the timer
(4) calculate total (elapsed) time, and the number of errors in their typed text.
(5) print results, allow them to try again or exit

then maybe draw a diagram of some functions, describe what task each function should do, use pseudo code to describe the functions inputs/outputs/return values, and indicated dependency direction of the functions.

and finally, start here:

int main()
    // insert code here

Once you've got it filled out enough so that you can ask a reasonably specific and coherent question... come back here and post your code.

In the meantime, please ask your instructor why (s)he insists on using such a piece of crap compiler (Turbo C), as it is 15+ years out of date, employs non-standard C libraries, and virtually NO ONE in the industries of the modern world ever uses it???

write down their answer, then post it here please.




How about beginning with something simple like

Print out a sentence for the user to type in, say
"type in this line"

Then read a line of input from the user, say
"ttpe in tjis line"

Then what are you supposed to do (read your assignment)
- compare the line for errors?
- provide info that say "y" and "t" are close together on the keyboard as an explanation for the mistakes
- time how long it took to type in
- provide some kind of "speed and accuracy" output?

Maybe try simple programming exercises like
Press a key in 5 seconds
You pressed a key in 4.34 seconds.


The default position for a person's fingers are ASDF with the left hand
and JKL; with the right hand. All other keys
are reached from there, so you can start by making the user learn off those keys first.
Display variations of ASDF first, then variations of JKL;
Then mix them and advance to the rest of the 2nd row.

Then the user learns off the first row, finally followed by the third, keeping in mind where the user needs to reach from to get to those keys.


yeah, theres obviously a number of different ways to approach such a "tutor"

i think SANZ is going to have to give us a bit more info.

it does sound like a fun little project.


sir i have asked my instructor why they compel us to use such an obselete compiler so she says it is the most easier one and if we learnt c on this compiler we will be able to learn any other language easily.well sir thanks for your guidance but prob is that i have just started studying c coding in my institution and have reached till array yet. i even dont know any thing abut graphics.the major prob is coding for typing tutor in c .secondly for my project wht features i proposed to my teacher is that there would be a keypad for typing as keyboard we have in typing tutor which guides us where we hve to put our finger .and another thing was paragraph drill and alphabet bubbles which has to be typed within given time.last thing was accuracy speed and duration.
these are the features which has to be there in my program.but i dont know how to implement them in my coding.
thanks for ur interest.


your instructor is smoking crack. learning to code on Turbo C will only hinder you, by teaching you non-standard C that will not ever work on any compiler used by the real world. you'll have to UNLEARN half the stuff you learn. Oh well, I'm going to drop the issue.

your program, considering your skills, i think is too ambitious to try and tackle all at once. make a smaller program to do simple tasks, and don't even think about graphics.

repeating what i said earlier, i think the following requirements would be a good start, and give you some simple functionality that you could build more complex functions into later:

(1) print some text to the screen that the person should type.
(2) start a timer, and begin collecting typed input from user.
(3) once the user indicates they have stopped typing, stop the timer
(4) calculate total (elapsed) time, and the number of errors in their typed text compared to the original text.
(5) print test results, allow them to try again or exit

technically this is more of a "typing test" than a "tutor", but all of the functions that you will have to code for this example, are functions that will be needed by a more complex typing tutor, so you won't be wasting your time.

it would be a good place to start, and would give you something tangible to show when completed.



thnx.first let me try your pattern.i will try to start my coding as u said.then if i have any prob in coding i will ask u back.
thank you.


hi sir,
after so long. sir i have tried ur pattern and just taken text as input as u suggested to start with the easier one.now sir i am having prob in timing that input text by the user. i mean how to start the clock as the user type in the printed text and how to calculate the errors in the typed text.waiting 4 ur reply.


Use the clock() function available in time.h twice. Once for starting the time and the other for stopping it. Take the difference and you have the time elapsed. Errors can be simply calculated by functions like strcmp.


hi sir,
thnks for ur reply. in the code below i have simply tried to take input through user.now how to calculate elasped time and accuracy .please tell that and on other hand there is a little bit prob that when a user is typing these paras the typed paras are very slowly typed i mean user has to press single key two times i dont know this why prob is occuring. i have just roughly tried it as to start something after some time i will take input para through string..
void main (void)
char letter;
printf ("\n");
printf ("\n\n dad as sad dad as sad dad as sad dad as sad dad as sad dad as \n\n lad lass lad lass lad lass lad lass lad lass lad lass lad lass\n\n alfa alfalfa alfa alfalfa alfa alfalfa alfa alfalfa alfa alfa\n\n\n");
printf ("\n jaffa salad jaffa salad jaffa add jaffa salad add salad salad \n\n flask jaffa flask jaffa flask jaffa flask jaffa flask jaffa\n\n kafka salsa kafka salsa kafka salsa kafka salsa kafka salsa \n\n\n");
while (letter=getche()!='\r')


now how to calculate elasped time and accuracy

Refer my previous post. And use code tags. Don't use getch() in the while loop. Perform the storing and comparing operations there. And at the end of it all calculate the time elapsed as described earlier. Also, use this


instead of your statement.


how can we make typing tutor software in c language. plz guide me.

hi! can anyone can help in my project???about typing tutor in turbo c??pls give me the answer now..the deadline is this night midnight..


For a beginning student, TC can work fine. There's no doubt TC is the easiest and the fastest IDE to set up, and get help in.

It works fine in XP and all earlier versions of Windows.

Naturally code blocks or visual express would be better choices, but they can't be installed and get the student working, as fast and easy.

Before you start your program, carefully think out what you want the program to do, step by step. Write out some pseudo code. Try to design it, more than stumble upon something that might suffice.

Worst thing to do is the obvious - sit down at the computer and start coding up "something" right away for your program.

We will help you with the C language part of it (although you need to show work on this part, as well). Before that however, YOU need to decide what you want your program to do - there are hundreds of ways to make a typing tutor program, work. Only you can decide on the design you want.

Edited by Adak: n/a

This article has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.