Please help me write a program

This is a discussion on Please help me write a program within the C Programming forums, part of the General Programming Boards category; I am going crazy, i have a program to make and i am doing it for hours and geting angry. ...

  1. #1
    Registered User
    Join Date
    Dec 2011
    Posts
    4

    Please help me write a program

    I am going crazy, i have a program to make and i am doing it for hours and geting angry. please help if you can.

    THIS IS THE PROGRAM I NEED TO MAKE AND FAST
    Write a function that adds the word in a sentence. The function has the following prototype:
    void add (char * sentence, char * word);
    Punctuation should be added immediately after the word. The function is necessary to dynamically
    allocate memory needed to add a word.
    In the main program, declare a pointer and dynamically sentence him to Allocate enough memory
    to enter 10 characters, download the word and add a function call. Adding repeat until
    a period.
    Write a function that will be removed from the sentence anagrams in a way that other characters move to the left.
    The function has the following prototype:
    remove_anagram void (char * sentence);
    In the main program call the function and display the newly created sentence.
    Write a function that will replace the words in each of the letters (first and last letters of change,
    second and the penultimate letter of changing places, etc). The function has the following prototype:
    void replace (char * sentence);
    In the main program call the function and display the newly created sentence.
    Last edited by mirko007; 12-15-2011 at 07:35 PM.

  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    21,648
    What have you tried and how does it not work?
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  3. #3
    a_capitalist_story
    Join Date
    Dec 2007
    Posts
    2,650

  4. #4
    Registered User
    Join Date
    Dec 2011
    Posts
    4
    i have a total blockage, i wrote the functions seperately to test them, i dont know how to use realloc proparly, when i try to add a word to the string it seems fine, and the printing ends something comepletely different

  5. #5
    Registered User
    Join Date
    Dec 2011
    Posts
    4
    hahaah come on thx its seems to be the same thing, he has a similar , he has to delete non anagrams , but thats simple to correct
    Last edited by mirko007; 12-15-2011 at 07:41 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Need help to write a program in c
    By cooljack08 in forum C Programming
    Replies: 15
    Last Post: 11-17-2011, 07:13 PM
  2. write a program
    By angelgemini in forum C Programming
    Replies: 13
    Last Post: 12-05-2007, 10:39 AM
  3. Is there another way to write this program?
    By agentxx04 in forum C Programming
    Replies: 1
    Last Post: 11-23-2004, 08:28 PM
  4. Anyone help me write this program better?
    By VegasSte in forum C Programming
    Replies: 2
    Last Post: 11-27-2002, 10:42 AM
  5. Help Write This Program Plz
    By Unregistered in forum C++ Programming
    Replies: 3
    Last Post: 10-13-2001, 01:08 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21