Ok, i'm working on a program in C to read in a file given by user and print it out to screen along with its size(for now). I haven't done very much C at all and am still trying to figure out all the pointers and stuff.
Q1. what do you recommend for C debugging? i've heard just using ddd or gdb is the best thing, but i've tried messing around with it and seems quite annoying. any good alternatives?
Here is the code:
static char *prog;
int main(int argc, char *argv)
printf("Welcome to the Word Length program\n");
char *word; //I believe my problem is here
printf("The word %s has size %d \n",word,n);
Welcome to the Word Length program
after that it just sits
q2. I need to use char *word; is there a method for scanning in words with the pointer? i know scanf works with char or w/e size but not with the pointer. any advice?