jeudi 2 avril 2015

Using the memset() and interpreting the size_t num of the funciton

I am trying to decipher a block of code that uses memset(). Below is what I am trying to decipher.



memset(buffer, 0, strlen(argv[1]) - 4);


From my understanding of the memset function, it is to fill the block of memory of "buffer" with the value of "0" and return the size of the string stored in argv[1] -4. Can someone explain argv[1] -4?


I understand that argv[1] is the first array to be set into the buffer.


I used resources from this website.


Aucun commentaire:

Enregistrer un commentaire