Search:

Type: Posts; User: 9988776655

Search: Search took 0.00 seconds.

  1. Replies
    4
    Views
    2,483

    fgets and new line

    I stored a string in a node using fgets.
    Its fine that the string has the new line character in it.
    I just want to print the string without the newline character.
    I dont want to change the data...
  2. function to find and replace a part of a string

    I deleted my post because I came to realise it was a stupid question
  3. Replies
    2
    Views
    2,044

    fgets changes my pointer!

    When I call editorLineInsert and I reach fgets, my list pointer changes and points to somewhere completely random. I just dont get it.
    After fgets magically changes the list pointer, I get a...
  4. Replies
    1
    Views
    1,017

    New programmer: how to print a string

    I used fgets to store strings into the data of my nodes.
    My problem is that fgets also stores the new line character into my node's data.
    I want to print the string to get this:

    The line: "My...
  5. I found out why my second program wont work. ...

    I found out why my second program wont work.


    scanf("%as", &a);

    It stops reading when there is a space!
    Will gets work with my large input?
  6. I made the changes to the previous post. Am I...

    I made the changes to the previous post. Am I creating any memory leaks now?
    Previously, Elysia said:


    The program itself seems to work alright. Can anyone suggest improvements?
  7. This is my latest try: I dont know if its right...

    This is my latest try: I dont know if its right though


    #include <stdio.h>
    #include <stdlib.h>
    #include <string.h>

    int main(int argc, char **argv) {
    int i; int c; int N; char* temp;
    ...
  8. I am still unsure of why there is a segmentation...

    I am still unsure of why there is a segmentation fault in my first program. How do I use malloc when I cant count how many characters are meant to be in my string? I looked at the information in your...
  9. New programmer - reading in a large expression

    Hi i need to read an expression that is very large and stuff it in a string. I dont know how long the expression is but it can be over 1 million characters.
    I need to use an array based solution....
Results 1 to 9 of 10