Search:

Type: Posts; User: Shinzu911

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    2
    Views
    878

    Fgets help again please

    within the getstring function, when i included the sizeof(); function into fgets, like this:


    fgets(str,sizeof(str),stdin);

    i obtained undesirable results.



    when i sent the size of the...
  2. what ??? I'm sorry for that I'll repost it when I...

    what ??? I'm sorry for that I'll repost it when I get home
  3. fgets help please [posted through my phon there may be errors sorry ]

    The program doesn't allow me to enter a name into the variable "name2"
    #include struct{ char name1[256]; int age; char name2[256]; }test;int main (void){ char...
  4. Replies
    4
    Views
    877

    i created my own because trying to input data...

    i created my own because trying to input data into a structure using fgets was problematic
  5. Replies
    4
    Views
    877

    A function error, Please help

    my getstring function is messing up if it's used after the program accepts an integer value


    the program does this :

    enter name 1 : mike
    enter name 2 : john
    enter age 1 :...
  6. Replies
    9
    Views
    1,097

    @grumpy i have tested it properly, the reason...

    @grumpy

    i have tested it properly, the reason as to why one works and the other doesn't? is beyond my knowledge, that's why in here now
  7. Replies
    9
    Views
    1,097

    @whiteflags please explain further - you lost...

    @whiteflags

    please explain further - you lost me because i thought my "selection sort" function allows the binary search to work,and the "search" doesn't always return -1 it returns the position...
  8. Replies
    9
    Views
    1,097

    Test condition problem,Please help!!!

    my test condition in the "ADD MENU" function


    if( (pos = search(ID) ) == -1)



    isn't working, thus two profile with the same ID can be added(which im trying to prevent)
    I dont understand...
  9. Trouble understanding some code please help

    just when i was conformable whit pointers i saw this ,

    Why does the function have an * in front it's name

    char *my_strcpy(char *destination , char *source)


    i thought it was a function...
  10. Replies
    4
    Views
    837

    ohhhhh i see thanks

    ohhhhh i see thanks
  11. Replies
    4
    Views
    837

    it works when i used x like this ...

    it works when i used x like this


    for(z_count=1; z_count<=nwords[x-1]; z_count++)

    but now i don't understand why it works with x-1 and not y_count because there the same in value
  12. Replies
    4
    Views
    837

    array help please

    i'm trying to output a number of "*" for the number it corresponds to in an array e.g


    array[3]={1,2,3};
    output:
    1 |*
    2 |**
    3 |***

    ii'm getting a weird output 'm not sure but i think the...
  13. Replies
    3
    Views
    1,351

    i'm ok with arrays it was the part above which u...

    i'm ok with arrays it was the part above which u answered i didn't understand thank you that helps allot
  14. Replies
    3
    Views
    1,351

    array concepts need

    can someone please explain this to me ?


    if (c >= '0' && c <= '9')
    ++ndigit[c-'0']; // this line > what is it and what does it do?

    taken from K&R:


    #include <stdio.h>
  15. Replies
    2
    Views
    1,036

    haha thank u

    haha thank u
  16. Replies
    2
    Views
    1,036

    simple error i can't seem to figure out

    compiler says "invalid lvalue in assignment"


    if(c == ' ' || c == '\n' || c = '\t')


    i don't understand why ,
    any help is appreciated thank u
  17. error while counting the number of words entered by user

    The program is intended to count the number of characters, words and lines entered. the program runs fine if only one line of text is entered, but if more that one line of text is entered the "number...
  18. Replies
    1
    Views
    1,199

    escape sequence help please

    hello, i'm having a bit of trouble with escape sequences

    A) \v - gives a vertical tab my text says


    printf("\vthis is a text");


    it doesn't print out vertical i get some weird symbol an...
  19. Replies
    1
    Views
    1,396

    array confusion (int vs char)

    i was reading a text which stated an integer array for e.g


    int array[5];

    can store 5 elements where ,as character array


    char array[5]={"abcd"}
  20. Replies
    2
    Views
    1,135

    thank you :)

    thank you :)
  21. Replies
    2
    Views
    1,135

    simple count line program

    hello everyone,
    i executed this code but the loop never ends because i have no idea what EOF is hence the number of lines that i enter is not printed.
    What do i press to signal EOF when i'm finish...
  22. Pointers help please(using pointers to copy a string)

    question A: in the while loop we have,"*pB++ = *pA++; " to copy the contents of strB to strB, why is the entire string copied because *ptrA++ insures that it starts from the second character in the...
  23. function to remove newline character (fgets)

    i edited my program using the fgets function, and read about it on how to remove the new line character , but since my program deals with and array of structures i'm really confused as to how i go...
  24. Thanks for the link btw, very helpful

    Thanks for the link btw, very helpful
  25. well what can i use instead ? all i know at...

    well what can i use instead ? all i know at present is scanf and gets
Results 1 to 25 of 43
Page 1 of 2 1 2