Category "c"

Stack balanced Parentheses build log show :- Process terminated with status -1073741510 (0 minute(s), 2 second(s))

When I try to implement parenthesis problem using stack (array representation) it showing above problem. Here I use dynamic memory allocation in array. When I

Gstreamer x264enc invalid buffer size c

I've been trying to use this gstreamer c code(my system is running on ubuntu 20.04 with GStreamer 1.16.2 and gcc 9.4.0): #include <gst/gst.h> #include <

Get window from XEvent

I'm struggling figuring out how to obtain the window a specific event was triggered from. What I want to achieve is the following: Capture XCursorNotifyEvent Fi

With arrays, why is it the case that a[5] == 5[a]?

As Joel points out in Stack Overflow podcast #34, in C Programming Language (aka: K & R), there is mention of this property of arrays in C: a[5] == 5[a] Jo

Compiles in CMD line fine with GCC but Visual studios "expression must have constant value" [duplicate]

As title states the code compiles and outputs in the GCC just fine, I want to step by step follow the code in visual so I can make sure I full

C Program, printf() and strlen() argument format for output

Why does my terminal crash when I attempt to run this C Program? Here are the instructions for the programming exercise. #include <stdio.h> #include <

Linear interpolation works on Windows but not on my PIC18F, trouble with 8-bit arch?

I've implemented linear interpolation on my PIC18F device where I'm interpolating ADC values with intervals stored in EEPROM. I tested the code and it doesn't c

Golang TCP Connection Slow when Server Doesn't Have Backlog Available

Update With the added pthreaded C client, the problem is recreated, indicating the long connection times are part of the TCP protocol, rather than specific impl

MD5 Hashing On Embedded PLC in C

I'm working on a project for work that requires me to convert password strings to MD5 hash and I'm having trouble. I know MD5 isn't the best for this purpose, b

modifying arrays in C

backstory (if interested): Recently, I have learned to write numbers in binary. So, I wanted to see if I could write every single possibility for 32-bits. So, I

What is the most efficient way of changing Cartesian topology to one that supports MKL Cluster FFT?

I have a 3-dimensional array of size = [Nx, Ny, Nz] currently distributed among nprocs = nprocs_y * nprocs_z processes as subarrays of local_size = [Nx, Ny/npro

Why isn't an IEC 60559 conformant implementation required to define __STDC_IEC_559__ (to 1)?

The C (C99+) standard requires (though implicitly) a conforming implementation to define __STDC__ to 1. However, the C standard does not require an IEC 60559 co

Declare a queue with x-max-length programmatically using Rabbitmq-c

I am implementing a RPC function for my C application , and try to programmatically declare a queue which limits maximum number of pending messages, after read

pybind11.h: No such file or directory

I am trying to compile Deepstream 6.0 Python bindings. My guess it that the issue not related to Deepstream, but to general C/C++ compiling issues: sudo apt ins

My code runs smoothly to the end in Linux but ends abruptly in Windows

I am new to coding. As a practice problem, I wrote a program to sort strings as alphabetically, as in a dictionary. My program takes as input: (a) The number o

Trying to get 'Style' list for a GtkWidget

I'm trying hard to get a list of style properties for a GtkWidget (GtkButton). This is my code so far: #include <gtk/gtk.h> #include <stdio.h> #inc

create a binary file after sorting a numbers with names

I'm trying to wirte a C Program, which sorting list of numbers with names from txt file and write it in a bin file but the problem is that i can't write the bin

Does `offsetof(struct Derived, super.x) == offsetof(struct Base, x)` hold true in C?

I am unsure what André Caron means here: Virtual functions in C ... some of this code relies on (officially) non-standard behavior that "just happens" t

Is there a way of "extracting" communication protocol from an old software?

I have an obsolete hardware level/pressure transmitter that communicate with mcu using custom protocol (it appear to be similar to modbus RTU), that hardware co

How do i copy n characters for m lines in a file (in c)?

I have a file of 1000 lines with up to 70 characters in them. I want to copy the 13 first in a table, the 15th-30th in another table... i tried many different t