Search:

Type: Posts; User: sisovich

Search: Search took 0.00 seconds.

  1. Thread: Malloc/Free

    by sisovich
    Replies
    5
    Views
    1,871

    malloc is used to reserve some portion of memory...

    malloc is used to reserve some portion of memory
    This memory will be referenced as a pointer

    As already said, this is useful when you don't know explicitely how much memory you would need when...
  2. Replies
    5
    Views
    5,087

    A brute force approach would be Starting N...

    A brute force approach would be
    Starting N
    Convert N to a string using sprintf (Nstr)
    Check if Nstr is a "palindrome string"
    Increase N and go back to the first until your final condition
    ...
  3. Replies
    4
    Views
    1,748

    As far as I know there is no a "unique" solution....

    As far as I know there is no a "unique" solution. GCC and GLIBC provides many "hidden" utilities to manage trees, hashes, queues, a long list
    The STANDARD C itself does not solve your questions as...
  4. Replies
    8
    Views
    2,376

    void removeCharSign (unsigned char ubuffer[],...

    void removeCharSign (unsigned char ubuffer[], char buffer[])
    {
    int i;
    for( i = 0; i < (int)(sizeof ubuffer / sizeof *ubuffer); ++i)
    {
    buffer[i] = ubuffer[i];
    }
    buffer[i] = '\0';
    }
  5. Replies
    14
    Views
    5,851

    If you get "Too many open files" and you have a...

    If you get "Too many open files" and you have a function that open a file....
    could be posible you call this function from a recursive function elsewhere ?
    are you sure you don't get out from the...
  6. Replies
    14
    Views
    2,000

    If your order algorithm is working, well then is...

    If your order algorithm is working, well then is ok
    However, for future references remember there is an standard function in the stdlib named qsort
    you have to create a function to compare the...
  7. Replies
    4
    Views
    1,685

    I tried to read the code, but I must admit I...

    I tried to read the code, but I must admit I don't understand well how it works
    For instance, you use some variables defined elsewhere and not in the same function, numbers, solution, N, etc(I guess...
  8. Replies
    15
    Views
    2,648

    Well, I didn't compile this, I only want to...

    Well, I didn't compile this, I only want to describe another way, using for and initializing color depending on the number of row.
    This will contain for sure some errors, but the idea I think is ok....
  9. Replies
    2
    Views
    1,121

    what it's important is to know that you cannot...

    what it's important is to know that you cannot trust in any determined size , that's why fgets is a nice function because you call it saying you want to read at most N chars, so in this way you avoid...
  10. Replies
    3
    Views
    1,173

    I don't use C for web suff (beware with the...

    I don't use C for web suff (beware with the overflow buffers, check always all input strings) , however, knowing is liunx, you must have available tons of C libraries for CGI.
    Google CGI C...
  11. Well as Bubba said, when you deal with I/O issues...

    Well as Bubba said, when you deal with I/O issues signals are almost mandatory, if you are in a Linux environment , try man signal and you will see the start
    If you want to apply a kind of brute...
Results 1 to 11 of 11