rakesh48019: OK, post what you've got so far, stripped down to show just the problem you're having, then we can see where you're going wrong and advise on where, why and possible solutions.

sofprog66: many people post to forums trying to get people to write their code for them, because they're on a course and want to get through it with the minimal legwork, which is fine but they don't learn anything in the process, plus credit shouldn't go to them but to the person who actually wrote the code. On the other hand if they post what they've got then we can see where they're struggling, for example if they say "I'm allocating an array", you wouldn't necessarily see the problem, but if they show you the code "char *str1=malloc(20); char str2[] = { sizeof(str1) };" (I saw something similar to that just yesterday) you can see they've pretty much not got a clue about the syntax.
Anyway if you think rakesh48019 will learn something by you writing the code for him (and maybe he will) then by all means go ahead and write it for him.

rakesh48019: sorry if you're offended by any of the above. People can be very devious and say all sorts of stuff to try to get people to write code for them. So please don't take offence, just post your code and we'll help you solve the problem(s) with it.