woop, thanks a lot. I didn't realize that :-/
it works now.
thanks again :)
Type: Posts; User: meriororen
woop, thanks a lot. I didn't realize that :-/
it works now.
thanks again :)
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...
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...
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
I finally could get this program to work :
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define MAX 33
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. ~___~
...
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,...
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...
Hmmm, after I changed feof() with fscanf () == 1, It went well.
Thank you :D
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()...
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...
Ok, thanks, I get it now. :)
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;
}
That is my question :)
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.
I am studying about stack and the teacher gave me this example,
//stacktest.c
#include <stdio.h>
void f(int **p){
int x = 1;
woops, I did it. I tried removing & and having a little change on the function.
thanks all
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....
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>
ah, hmm, how if i make it like
int counter[TEXT_MAX_SIZE] considering the largest possible size of counter[]
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...
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...