Share your repls and programming experiences

← Back to all posts
memset, memcpy in c

The name has NOTHING to do with cats :)
Think about strcat. This project is just like strcat, combining two strings, or more, together.
The only difference is, GETCAT combines two strings together with a symbol of set ammount of times.

Check it out, read the little note I left at the top, and correct me if I am wrong about continuous memory copying from one memory block to another.

I am always open to your opinions and or thoughts(After all, I am just 15 years old and have plenty of time to learn)

Highwayman (1358)

As for your comment...

The first thing I think about is strings in c++, which are constantly being copied (every time you append to it, every time you resize it, every time you pass it to another function, every time you assign it.... the list goes on), so I guess it’s not entirely horrible to do so. Then again they probably use some form of pre allocating memory so the amount of copies is reduced for resizing and appending... but that still doesn’t deal with the other situations. Also these days I’d say a 40kB is probably actually not that much anyways seeing as we have several go of ram. 🤷‍♂️ Just my thoughts.


@Highwayman Yes, but I am talking about repeating this action multiple multiple times within a C back-end application. I may have the concept of memcpy and memset totally wrong, but allocating one block of memory to another block of memory over and over and over would eventually take a "Light weight" application to a very dense, storage killer. I may be totally wrong though, I am roughly new to C and am still learning about Pointers, Locations, allocating memory, re-allocating memory, and just memory handling in all. Thanks for you comment!

Highwayman (1358)

@CTALENT Oh well if your talking light weight, then yeah I‘d think your right. I guess I was just thinking in general, for that though it makes sense.


@Highwayman Yeah..I feel like the whole purpose of using C for any type of back-end is to make sure the application is light weight and fast. That's my understanding of the language anyways. Thanks again for your comment and if you ever want to get in contact with me to discuss code my email is: [email protected]

Highwayman (1358)

@CTALENT eh I guess. I wouldn’t know lol I just use C++, and use it for everything XD. That would be cool, maybe I will! :)