Category "c"

Is there a way to make a node of Linkedlist point to a node that isnt next in the list

I am making a snakes and ladders game in C using a LinkedList, I have a square struct that represents squares on the board. I need to add snakes and ladder that

How can i load a GTK4 demo example? (File browser specifically)

To get in context, i am making a GUI application that based on a input command through a GtkEntry like ls it would pop up a window with the respective files in

CS50 pset4 blur function doesn't calculate edges and corners correctly

Hey, so I been stuck on the cs50 pst4 for a while now, specifically on blur. The goal is to create a filter which blurs the image by changing each pixel to the

My decimal to hex conversion function only woks with positive nums

I'm having problems converting negative numbers, from decimal base to hexadecimal base, with the following function: #include <stdio.h> int main() {

SGX_UNEXPECTED_ERROR When encrypting with sgx_rsa_pub_encrypt

I am trying to use the tcrpyto API bundled with Intel SGX in order to generate Public/Private key pair and encrypt information with it. The public Key seems to

How to find a missing value in an array? [duplicate]

I am trying to find the smallest missing element of an array using function check, which has two arguments (n and array A). I can't understand

In Assembler AT&T context: What does movl do in this specified line?

i have a some simple lines of code in C and wanted to disassemble it: #include <stdio.h> int main(){ int i=42; } After compiling it and starting gdb, i

Want to know how to divide my code into separate functions

I have recently started learning C in university and my task today was to write a program that calculates the average price of products in an array of structure

Which type of function fits more [closed]

Say, I need to sort some scores from classOne, classTwo, and classThree. Each class has their own file, named as stated previously. I need to

Why does using `g_application_run` create a lag of ~25 seconds?

I'm trying to learn GTK3, but the documentation is problematic at best. The most frustrating problem comes from using g_application_run. It seems to create a

Writing a task in VxWorks

I am trying to understand how can I write tasks for VxWorks. I have VxWorks on a board that is mounted on a development board. I can access the board through Pu

stack smashing detected when trying to get to typedef two dinatial array that the adress store inside struct

i have this typedef of two dinantial array, and strust the keep his adress typedef double mat[MAT_SIZE][MAT_SIZE]; typedef struct matList { char *name;

'No such file or directory' whilst the directory already exists. (c)

Whilst trying to compile my C project with GCC, I keep getting an error that goes something like this: main.c:2:10: fatal error: ./include/windows.h: No such fi

Integer promotions in C programming

In the code below which statements have integer promotions? unchar a; unchar b; short c; a = 0xFE; b = 0xFE; c = a+b; int d = a==b I got the question like this

I use function in my code and somehow it doesnt work anymore

So I was practicing some coding about how functions work and I ran into a problem: The code is meant to reverse a number. The algorithm works perfectly well so

Problem with rms and dB values of discrete samples

I'm trying to sample pcm-data via the ALSA-project on my RaspberryPi 4 in c. Recording things works like a charm, but tampering with the samples themselves leav

find elements of an array in another array, why do I have this error?

I was trying to visualize the algorithm of this exercise, but I'm having a lot of problems. the exercise asks to implement this function: extern const void *mem

GTK Widgets changing with CSS

I can change the color of a button with CSS (background und color). But this don't work for dropdown button and textview. Do you have any suggestions? "#Button

I'm new to C and am stuck with many issues, I have fixed them but I wonder if there are better ways

I'm new to C just coming out of my second university class that explained structs and string functions. I tried running the code we had written in the lesson an

Longest increasing subsequence with minimum sum

I know there is a longest increasing subsequence algorithm that runs in O(nlogn) (https://www.geeksforgeeks.org/longest-monotonically-increasing-subsequence-siz