Recent content by doktorwho

  1. doktorwho

    How to dynamically allocate an array of strings

    Wow thanks a lot! Only one question. When do i then free person1 and person2? They need to be freed before the while loop goes on again, right?
  2. doktorwho

    Help understanding phasor solution

    Homework Statement From the given circuit and provided information draw a phasor and calculate the inductance. Homework Equations 3. The Attempt at a Solution [/B] The paper was given to me at class as a solution to our homework and i can't understand how they drew the phasor and drew the...
  3. doktorwho

    How to dynamically allocate an array of strings

    I was supposed to write a program that has a while loop in which two people, person1 and person2 input a string. The program runs the loop until one of the people inputs "it's over". At that time the program should exit and print out the correspodance between these two people while they were in...
  4. doktorwho

    Help with pointers and strings in C

    Thanks for the answer :). I agree with you that its highly inefficient to allocate for every string but its what they want me to do. They don't care about the efficiancy at all. My problem now is described in my last post. Like in the other programs i posted i need to have a while loop to run...
  5. doktorwho

    Help with pointers and strings in C

    Do you have an idea of how i would incorporate this into the code: I am supposed to have a big while loop that let's you enter strings until you enter "please stop!". Basically a big While aroung the program that is true until the program exists by "please stop" and when i do enter that it...
  6. doktorwho

    Help with pointers and strings in C

    I think i got it, its still about 250 lines of code but it works..
  7. doktorwho

    Help with pointers and strings in C

    With a little help i made some important changes to the entire program and now it compares and copies the strings the right way. Another importnat thing is that the mission of my program has changed. The correction was made so that my program should find every ocurrence of a number in a string...
  8. doktorwho

    Help with pointers and strings in C

    Homework Statement I have to create a program that dynamically allocates a string and uses up no extra space (The string takes up as much space as it needs to),checks if entered string is 'please stop this', if it is then the prgogram exits and if it isn't then it continues, it makes a copy of...
  9. doktorwho

    Help writing a program (crossword puzzle)

    I have read the site you suggested and was able to write the modification succesfully. One last thing that bugs me is the part where it says: Each time a memory is allocated during the process check the succesfulness of that function and if it was unsuccesfull report an error and close the...
  10. doktorwho

    Kernighan vs Deitel: Which C Programming Book Is Best for You?

    Haha, i meant is that enough time to read through the bigger one without confusing the hell out of me xD :D but thanks i decided to go for the Deitel's
  11. doktorwho

    Kernighan vs Deitel: Which C Programming Book Is Best for You?

    The test which i described is in a month and deals with topics up to Pointers and the final is in two and a half months and deals with topics beyond pointers. Does that change your answer?
  12. doktorwho

    Kernighan vs Deitel: Which C Programming Book Is Best for You?

    https://www.amazon.com/dp/0131103628/?tag=pfamazon01-20 https://www.amazon.com/dp/0133976890/?tag=pfamazon01-20 These two books are recommended by my school's C programming course and i can't decide which to buy. I have a big test in about a month in which i will have 2 hours to write 3...
  13. doktorwho

    Help writing a program (crossword puzzle)

    Ok i will give this a read. How much does this change in my original problem solution? The parts that are included in the solutions are inputting of the characters and then going through the array to find the most * appearances over rows and coloumns. What will this modification change...
  14. doktorwho

    Help writing a program (crossword puzzle)

    That helped a lot and i was able to succesfully write it to do what it is supposed to. I have one question though. Part of this homework says that after we write this program we need to make another one which is the same concept like this one but uses dynamic memory to store inputs and only one...
Back
Top