ptr = (char *) calloc (100, sizeof (char));
free (ptr);
how can free() know how many bytes to free? (in this case 100)
Type: Posts; User: falconetti
ptr = (char *) calloc (100, sizeof (char));
free (ptr);
how can free() know how many bytes to free? (in this case 100)
Hello
I am starting to understand signal processing in UNIX. I still have some doubts ...
In the following program (not written by me, of course) why is sigint_handler() declared inside main()...
Hello,
Here comes one of those questions that I am always afraid of asking... I have the feeling it is quite a simple one and it almost feels ridiculous, heh. Well ...
In a prototype...
Spain here.
Toro, Olé !
Now the whole thing starts to make sense.
Thank you all !!
Ok, here comes an example from the book:
table = (int **)calloc (rowNum + 1, sizeof (int *));
table[0] = (int *)calloc (4, sizeof (int));
table[1] = (int *)calloc (2, sizeof (int));...
Hello all.
I have a question regarding arrays of pointers.
Let´s say I want to create an array of pointers, each pointer pointing to an array of integers. I have 5 arrays of integers, that...
Thank you all for good suggestions. After playing a bit with vimrc I think I have got colors and indentation back !
Hello all.
I have installed a new distro on my comp and I just wonder how I can configure vim editor so colours and tabs show when writing code. Any help appreciated.
I took some time for me to understand why I should create a new ponter to a pointer , but I got it now.
The value of the old pointer is changed by the called function:)
Tnak you, zen
Hello all !
I am starting to use my new aquired (and limited) knowledge on dynamic memory. With this program I intend to allocate some memory from the program heap and use it for storing an array...
Thank you, QuestionC.
I should have remembered that an array name actually is a pointer constant and not a pointer variable.
Things seem much more clear now :)
Hello all !
I am reading my first c book, and I could almost say "so far so good". Some serious doubts are starting to arise though. Most of them regarding pointers (I know you expected this :) )...
Thank you Salem !
Command gcc -lm prog.c solved the linking problem :)
Hi
I am new to c programming. I am also a linux newbie.
Well, I am reading my first c book, "A Structured Programming Approach Using C" by Forouzan & Gilberg. So far everything has gone smooth...