I just started learning files in c few days ago. In order to understand how to manipulate correctly the functions, I wrote a code who create a new file (w+) rea
i am desperate to get a complex c datatype correctly marshaled for C#. I already read all the other posts regarding that topic and i am running out of ideas alt
I have been given a list of the following check box containing all possible solutions to the question of choosing all true answers equivalent to O_RDWR on Ubunt
the standard linux fcntl call doesn't provide a timeout option. I'm considering implement a timeout lock with signal. Here is the description of blocking lock
Sample code (t667c.c, taken from here): #include <stdio.h> #include <time.h> int main(void) { struct timespec ts; timespec_get(&ts, TIM
This is a problem from competitive programmer's handbook: We are given the prices of k products over n days, and we want to buy each product exactly once. Howev
I'm getting started in c and would like to create GUI, so I tied using GTK. I followed the tutorial they gave on https://www.gtk.org/docs/getting-started/hello-
The code I've written is not producing any output. It just takes the string as an input: #include<stdio.h> #include<conio.h> #include<string.h&g
I wrote a program that finds and displays all the elements in the 2D array, which have all neighbors(left, top, right, bottom) - even. I tried to put in an if,
I have a value, of type signed int, which is always clamped between, for example, ±1073741824 (2^30). I should be able to safely add or subtract any arbi
I'm writing a C application to drive a LED strip on a Linux machine: the application listens on a TCP socket port to receive commands. If the connection is term
I’m trying to use bpf_get_stackid in the eBPF to query the kernel stack with the flag BPF_F_FAST_STACK_CMP. In the stacks map(BPF_MAP_TYPE_STACK_TRACE typ
I have a source pointer (pSource) and a goal pointer (pGoal). I also have a number of characters (n) that need to be copied to the pGoal from pSource. I thought
Failure Given the following cmocka test with a static variable in a dependency: main.c #include <stdarg.h> #include <stddef.h> #include <setjmp.h
I have a working C program that has the simple function that returns a d character encoded in a byte array. char foo() { return 'd'; } char byte_array[] = {0
For example, there is three object files a.obj b.obj c.obj just compiled out with cl, and it is desired to combine them into one combined.obj. A comment of an S
I have a working C program that has the simple function that returns a d character encoded in a byte array. char foo() { return 'd'; } char byte_array[] = {0
I know a very large two-dimensional arrays in C needs a long identifier for the variable type when assigning memory to the array to avoid stack overflow errors
I know a very large two-dimensional arrays in C needs a long identifier for the variable type when assigning memory to the array to avoid stack overflow errors
I need to open the default audio capture device and start recording. libsox seems to be a nice cross-platform solution. Using the binary frontend, I can just re