Search:

Type: Posts; User: meriororen

Search: Search took 0.01 seconds.

  1. Replies
    2
    Views
    1,259

    woop, thanks a lot. I didn't realize that :-/...

    woop, thanks a lot. I didn't realize that :-/
    it works now.

    thanks again :)
  2. Replies
    2
    Views
    1,259

    httpclient segmentation fault

    Hello all, I am working on an assignment about http client here,
    everything went well until I add url and path input function into it.

    here's the code :



    #include <stdio.h>
    #include...
  3. Replies
    1
    Views
    1,590

    nth fibonacci

    can someone explain to me how this program calculates nth fibonacci number? I scribbled for 2 hours now and stuck :)
    hints greatly appreciated.


    int f (unsigned int n) {
    int x = 0, y = 1, a...
  4. Replies
    12
    Views
    7,619

    Sorry about the lack of explanation, I am not...

    Sorry about the lack of explanation,

    I am not too good to express things in English :P


    The program was meant to find groups of anagrams in given words, e.g. :



    file
  5. Replies
    12
    Views
    7,619

    I finally could get this program to work : ...

    I finally could get this program to work :



    #include <stdio.h>
    #include <stdlib.h>
    #include <string.h>
    #define MAX 33
  6. Replies
    12
    Views
    7,619

    ok, I found the segfault reason, ...

    ok, I found the segfault reason,

    sizeof(anagram) give out 4 (as sizeof(char *) is 4).. I changed it..

    but another problem came, no matter what input I gave, the result keep showing 1. ~___~
    ...
  7. Replies
    12
    Views
    7,619

    it supposed to check whether the angram of the...

    it supposed to check whether the angram of the next given "input" is already inside the anagram[] array..

    I check areAnags() in another program (i simply put two words as the input) and it worked,...
  8. Replies
    12
    Views
    7,619

    anagram program

    Hi there people,

    I need a little help here with a program I made, its about finding how many pairs of anagram there are in a given input (can be from keyboard, or a text data). The number of words...
  9. Hmmm, after I changed feof() with fscanf () == 1,...

    Hmmm, after I changed feof() with fscanf () == 1, It went well.

    Thank you :D
  10. Actually I wanted to do that, but I have to read...

    Actually I wanted to do that, but I have to read the file more than once,
    I got stuck on returning the pointer of the file to the beginning after it is being read. I heard fclose() then fopen()...
  11. put matrix from file into 2d dynamic array

    I am working on a program which reads a matrix of integer and inputting them into a 2-D dynamic array, and also finding its dimension. Here is what I made so far :



    FILE *fp;
    int...
  12. Ok, thanks, I get it now. :)

    Ok, thanks, I get it now. :)
  13. so, lets say if I change p in function f to p1 ...

    so, lets say if I change p in function f to p1


    void f(int **p1){
    int x = 1;
    printf("&x=%p\n", &x);
    *p1 = &x;
    }
  14. That is my question :)

    That is my question :)
  15. 1. It is the address of a and x? 2. pointer p...

    1. It is the address of a and x?
    2. pointer p points to the same address? (why would it points to the same address ?)
    3. I got different address with the a and x variable.
  16. can anyone explain this to me? (stacktest.c)

    I am studying about stack and the teacher gave me this example,



    //stacktest.c

    #include <stdio.h>

    void f(int **p){
    int x = 1;
  17. Replies
    9
    Views
    10,330

    woops, I did it. I tried removing & and having a...

    woops, I did it. I tried removing & and having a little change on the function.

    thanks all
  18. Replies
    9
    Views
    10,330

    actually it always returns 0 when I input more...

    actually it always returns 0 when I input more than one character..

    I tried to do this



    char p[10], q[10];


    to determine the length of the array, but it got stuck in compiling process....
  19. Replies
    9
    Views
    10,330

    comparing 2 strings with pointer

    Hello all,

    I am trying to make a program that compares two strings, but I got stuck here ;)
    I am a newbie in using pointer, can anyone help?

    here is the source code :


    #include <stdio.h>
  20. Replies
    7
    Views
    4,356

    ah, hmm, how if i make it like int...

    ah, hmm, how if i make it like
    int counter[TEXT_MAX_SIZE] considering the largest possible size of counter[]
  21. Replies
    7
    Views
    4,356

    thank you very muchh!! :) this is my current...

    thank you very muchh!! :)

    this is my current program, I don`t check it thoroughly, but I made sure it works..



    #include <stdio.h>
    #include <stdlib.h>
    #define PATTERN_MAX_SIZE 1024
    #define...
  22. Replies
    7
    Views
    4,356

    Boyer Moore with exact positions

    I am sorry I am a newbie in C programming, I have a question concerning Boyer Moore Algorithm (pattern search inside a text),,

    (sorry about my English too ^^)

    currently, I have the following...
Results 1 to 22 of 22