I'm trying to code a TreeSort function in C89 for practice with a qsort parameters i.e. (void* base, size_t num, size_t size, int (*compare)(const voi ...
I'm trying to code a TreeSort function in C89 for practice with a qsort parameters i.e. (void* base, size_t num, size_t size, int (*compare)(const voi ...
Let's say I have this code: All I want is to interpret the bits from the bits variable as a float. I came to understand that this is called "type p ...
I have received the Segmentation Fault (Segfault) because of the free() function in the following code. How the free() function can be used in this c ...
Simply switching the order of memcpy execution will mess up the output. Tried it on https://www.onlinegdb.com/ Why would the order of execution memc ...
I have a char *data that is a Datagram to represent the packet I want to send in but I need to insert on that an uint8_t array. Doing this allows m ...
I have a problem with STM32F401CCU. After executing a code disconnecting and connecting power the STM freezes and to unfreeze it I need to reload the ...
Is there a method of using memcpy (or similar) to copy from one circular array into another, but with an offset? I can do it with loops, but I want to ...
I'm trying to use memcpy to copy part of an unsigned int to another unsigned int within the same struct I made. But my program only prints the first p ...
I've a setup where I need to exchange data provided in structs between two modules . Module 1 provides data in a shared_ptr of a struct, while module ...
Below is a struct that I have and a variable of the type of this struct RtpHeader. I do understand what the memcpy() fuction does. But I don't unde ...
I'm experimenting with memory handling in C. Giving the following code I'm obtaining the following error at the end of the execution of the code * ...
I've been trying to get shell from this function but nothing seems to work so what's happening here is that I have a variable of size 32 bytes and I'm ...
Trying to allocate buffer from TCP/UDP message into struct/class types (with only public variables), like the one below But when I checked the memb ...
In C and C++, is it undefined behavior to memcpy into a const variable when the number of bytes to be copied is zero? This question is not purely t ...
SHORT VERSION: Performance metrics of the memcpy that gets pulled from the GNU ARM toolchain seem to vary wildly on ARM Cortex-M7 for different copy s ...
I'm working with a piece of C++ code previously compiled (for x86) with clang++. In converting to gcc, I'm seeing an error on the following line: I ...
I know about the memcpy/memmove to a union member, does this set the 'active' member? question , but I guess my question is different. So: Suppose si ...
I have a PCIe endpoint device connected to the host. The ep's (endpoints) 512MB BAR is mmapped and memcpy is used to transfer data. Memcpy is quite sl ...
Below is an example of processing very similar to what I am working with. I understand the concept of endianness and have read through the suggested p ...
Consider a class with just a single member for this example. I was curious as to the proper way to overload the = operator and why one way works an ...