Help with some programs in C. - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Help with some programs in C.

rasrazielrasraziel Posts: 2Member
Hello! I'm new to this forum.

I really suck at C/C++ and I was wondering if anyone can help me with some programs.

1)

[color=Red]Write a program in C, which will create a child. The father and the child will communicate through pipes. The father will read words from the user, which he will then send to the child. The child will calculate the number of letters the word has and return that number to the father.
When the user inputs the word "END", the child will terminate and the father will print the total number of letters from all the words given and then terminate.[/color]

2)

[color=Red]Write a program in C, which will create a child. The father and the child will communicate through pipes. The child will read letters from the user and send them to the father. The father will take those letters and turn them to lowercase if they are uppercase and the opposite and send the altered letter back to the child, which will print it. The two processes will finish if the user inputs the letters "Q" or "q".[/color]

3)

[color=Red]Write a program in C which will print a menu so the user can choose if he wants to print the contents of a file, calculate the size(using lseek) of the file or delete the said file. Then it will ask from the user the name of the file he wants those actions performed on. Each action will be executed by a child that the father creates. [/color]

I do realize that it may seem that I'm asking for you to do my homework, but I really want to understand those programs. So it would be great if you could write some comments next to each line of command. The point is for me to understand.

Thank you, and I'll be waiting.

Comments

Sign In or Register to comment.