I have a server process that allocates a big chunk of memory using the System V XSI shared memory calls (shmget/shmat), from address to 0x500000000 to 0x1d00000
#include <stdio.h> int main(void) { int* ptr = NULL; *ptr = 10; printf("%d", *ptr); return 0; } I am very new to C programming and sorry
Can someone please explain whether i = x[i]++; lead to undefined behavior? Note: x[i] and i are not both volatile and x[i] does not overlap i. There is C11, 6.5
I am working on a project that requires me to allocate some space using the mmap function and I need to create a bitmap in the beginning of the allocated space.
I have some pretty simple questions. What is the main difference between node.h and napi.h. What should I use for normal/personal use case. Why are there more "
I am creating an executable with this: gcc elliptical.o -Llibs -lhfcal -o elliptical In my libs sub folder there are: libhfcal.a libhfcal.so files. My purpos
I have simple code that reads a .jpg file But my read returns 0 and errno is 0. I just prefer of use read with read syscall. #include <stdio.h> #include &
I have intel system with Ethernet controller: Intel Corporation 82579LM Gigabit Network Connection (Lewisville) (rev 04). I have downloaded the datasheet like d
I have a strange problem with gcc and constants and .rodata Let's assume: typedef const struct { const char *a; } data_t; typedef const struct { const dat
I'm pretty new to C and I can't figure out why I'm getting a segmentation fault from this code: void delete_list(LIST *list) { NODE* n = list->head; whil
I have been doing a school project about digital watermark based on DCT using LabWindows CVI 2012. I divide an image with the size of 512 * 512 into many 8 * 8
I have been doing a school project about digital watermark based on DCT using LabWindows CVI 2012. I divide an image with the size of 512 * 512 into many 8 * 8
I have two functions. One that returns the part of the string for me. Don't ask me why I'm doing it inside a function because I want to run this inside a thread
BACKGROUND: I read several articles about performance benchmarks between LuaJIT and C-language. There were different conclusions, so I tried to compare the spee
I just created a DLL in C with Python in it. When I export my function with python functions in it, I can't call it in my Python code But when I export a classi
I have a gtk scale with range, and my goal is to capture when the user releases the click from the scale. (value-changed is called even when the slider is still
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