Computing.Net > Forums > Unix > reverse code in C

reverse code in C

Reply to Message Icon

Original Message
Name: mona
Date: May 20, 2006 at 12:29:46 Pacific
Subject: reverse code in C
OS: sun
CPU/Ram: unix
Model/Manufacturer: sun solar
Comment:

i have this question please help me. if you can i just need the code for the reverse>>
>>>>>

Sleepy head (using shared memory)
Write a C program (give it the name: sleepy.c) which receives no arguments. The program must create a shared memory that has the following requirements:
- Size: 256 bytes
- Permissions: allows owner and group for read/write only.
After attaching itself to the shared memory, the program should be able to read from the standard input any string. The string must be placed in the newly created shared memory. It should print its content on the screen. Finally it should fork a child and sleep for 5 seconds to let the child do the following work:
- Reverse the string in the shared memory (This is NOT invertCase that we saw before. This is just reversing the string as if you read it backwards).
- Print the content of the shared memory on the screen.
- Detach itself from the shared memory.


thanks alot


Report Offensive Message For Removal







Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: reverse code in C

Comments:

 


  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 
Data Recovery Software