Search:

Type: Posts; User: weareandrei

Search: Search took 0.01 seconds.

  1. Replies
    2
    Views
    7,760

    fgets() does not work properly

    Hi! I know this has been raised so many times. But no recommendations from the previous questions worked for me...

    I have 2 fgets() in a row:



    printf("Please enter title:");
    // Making sure...
  2. Replies
    1
    Views
    7,122

    Endless fgets()

    Hello!
    My fgets function never stops, although I set the limit to the string length that is excepted.



    char string[100];

    ...
    case 1: {
    //scanf(" %s",string);
  3. So If I do: char *name; Then I could...

    So If I do:


    char *name;


    Then I could practiacally have an unlimited space? Because name points to some location 1000 for example:
    [1000] [1001] [1002] [1003] [1004] [1005] [1006] [1007]...
  4. A little confused about how strigns work!

    I know that a string is basically a pointer to the first character, and the next memory adresses will contain the next characters until the \n indicates the end of the string. But do we need to...
  5. Segmentation Fault when printf string from a textfile

    Hi! I have a struct


    struct Human {
    char *name;
    int age;
    };


    I am trying to save and then read from textfile. I am doing this:
Results 1 to 5 of 5