Sorry for the late response, I had some things to do.
Code:
char out[256]; This seems to go fine: Code:
char var[10]; Code:
char aap[3] = "aap"; |
You didn't allow the string app to have any space for the null terminator... try
Code:
char app[4] = 'aap'; |
Quote:
And be carefull over there please. Quote:
|
The last thing I don't understand is the memset part from this:
Code:
arg_length = strlen( argv[i] ); |
It is used to inilisalise the area of memory. When malloc is used it will return a memory location and it could hold anything. This just ensures that the memory is clean.
|
Quote:
|
All times are GMT -5. The time now is 12:52 PM. |