Category "c"

Calling a .bat file from C program fails but if double click it works

I have this file.bat : cd "C:\Program Files(x86)\Anydesk" && anydesk.exe If i double click on it it works fine and does what i want. Now i try to launc

Move the head node from a first linked list to the back of a second linked list

When a certain if statement is passed i have to remove the head node from my first linked-list "new_queue" and add this to the back of my second linked-list "re

Cross-compiling the gettext library: error when relinking for armv7a

I'm trying to cross compile (for armv7a and aarch64, android) the gettext library (dependency for glib). The configuration and compilation is successful, but du

my copy array function didn't work. i didn't understand why

This code has to copy one array to another via void copy function. But I don't understand why it doesn't work. #include <stdio.h> void copy(int func_arra

Why is my Professor's Linked List Printing Backwards?

I have a project that I'm working on for a Systems Programming course. I'm building off of my professor's code. (Please don't mind her lack of labelling, etc. -

codeblocks output differs from online compilers

In short, I should have " 1 2 3 4 5 6 7 8 9 10 ". When executed in CodeBlocks instead of 0 i am getting random numbers. But When compiling using onli

find the nth root using binary search algorithm using C

double x; size_t n; double precision; double high = x < 1.0 ? 1.0 : x; double min = 0.0; double unknown = //idk?? double eps = 1e-6; double multiply(doub

find the nth root using binary search algorithm using C

double x; size_t n; double precision; double high = x < 1.0 ? 1.0 : x; double min = 0.0; double unknown = //idk?? double eps = 1e-6; double multiply(doub

How can i include my certificate chain and private key in a tls server using openssl library?

I am trying to write a c code to implement a tls socket using openssl. The server has a certificate chain with 4 certificates: leaf certificate - intermediate1

python package equivalent in C

I'm kind of a beginner in c, and I would like to know if there's a way of making a package like in python, for example: . ├── main.py └&

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