Below I have a struct with multiple dynamically allocated char arrays. It compiles, Valgrind indicates no issues and it functions as anticipated. Earlier, someo
Suppose I have N items and a binary number that represents inclusion of these items in a result: N = 4 # items 1 and 3 will be included in the result vector =
I have the following C code: #include <stdio.h> #include <stdlib.h> typedef struct num { int a; struct num *c; } num; void init_struct(num *n)
Our internal program is written in C and makes extensive use of snprintf() for many pieces, and I noticed that during debugging with perf record/report, it's sp
I have a struct typedef struct hash_entry_{ char *string; void *data; struct hash_entry *next; }hash_entry, *p_entry; I am referencing p_entry later i
Hi all i am converting my C code to MIPS but problem is here i couldn't make correct logic for this for (int i=0;i<count;i++) { h[a[i]]++; } as
I would like to run ansi C unit tests in VS by mean of Test Explorer (not only with Console). I saw that it's possible for C++ projects (https://docs.microsoft.
I have been trying to append raw bytes to an existing zlib stream using the deflatePrime function provided by the zlib library. However, i cannot understand wha
Let's say I have this struct typedef struct { int AM; char* name, surname; }Item; and I want to define a constant NULLitem with AM = -1 and NULL name/
I want to use KCOV (code coverage for fuzzing) in the Linux kernel to record the coverage of certain system calls. I have enabled the corresponding kernel conf
Im trying to run my c code. but im getting a problem and really tried that much to get the right thing and i couldnt know what the problem. what is visual studi
I have included my code below. I have it reading and printing the first line of a binary file. The rest of the file is meant to be put in a struct that contains
I am making a post request from my ESP32 S2 Kaluga kit. I have tested the HTTP request while running a server program in my LAN. I am using esp_http_client_hand
So I am trying to use following library: Open Quantum Safe I am using windows linux subsystem, so I followed the linux setup. I think I followed all the steps c
I'm trying to make an analogue of sscanf with a specifier %p. I use this: int res = ahex2num(buf); *va_arg(ap, void **) = (void *) res; It works correctly, i a
parent: volatile int signalval = 0; void signal_handle_c(int sig_num) { printf("child SIGUSR1 ok\n"); signalval = 1; }; int main(int argc,char**argv){
Recently I have migrated my app from OpenSSL 1.0 to OpenSSL 3.0. And now my connection is not working anymore. The methods which perform private encryption and
Does anybody have a simple example on how to call a C function from Java 17 that includes creating a C library and how to setup a MethodHandle? The JEP descript
While testing things around Compiler Explorer, I tried out the following overflow-free function for calculating the average of 2 unsigned 32-bit integers: uint3
Does the c standard provide a thread safe random number generator where instead of using a global state the generator uses and modifies the provided state buffe