Search:

Type: Posts; User: std10093

Search: Search took 0.26 seconds.

  1. Replies
    16
    Views
    2,044

    Haha, thanks :D , but forgetting to free my...

    Haha, thanks :D , but forgetting to free my memory is a big mistake! Bravo for your observation ;)


    So right before return 0; (where main terminates at these two lines of code)


    for(i = 0 ; i...
  2. Replies
    16
    Views
    2,044

    For a goodnight post let me argue with myself for...

    For a goodnight post let me argue with myself for this comment


    /* This is not necessairy.Can you see why? */
    pivot += i;

    Actually it is necessairy.

    I will prove...
  3. Replies
    16
    Views
    2,044

    Ok here is my approach #include ...

    Ok here is my approach


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

    void initstrFound(char* array , int n ,char* searchStr)
    {
  4. Replies
    16
    Views
    2,044

    You are checking the wrong value i would say :) ...

    You are checking the wrong value i would say :)


    for(array_ctr = 0; ctr < data[0].x; array_ctr++)
    printf("%s\n", data[array_ctr].string1);

    This should be array_ctr maybe... Try this...
  5. Replies
    16
    Views
    2,044

    I would also like to point out that before...

    I would also like to point out that before entering the loop, memory is allocated for string2.Then string1 is copied into string2.
    Then the loop will get into the if body and realloc string2 into...
Results 1 to 5 of 5