Why is the reduction in this code throwing an error: I expected this code to make the value of avgs private for each thread in parallel and the ...
Why is the reduction in this code throwing an error: I expected this code to make the value of avgs private for each thread in parallel and the ...
I am new to OpenMP and think my use case is not simple - hence looking for pointers on approach. Is there a way to enforce execution of tasks in orde ...
I was experimenting with some ~2005 C code (using OpenSSL 0.9.8, I think) and I tried make-ing it with OpenSSL 3.0.2 on Ubuntu 22.04. Minimum example ...
The answer might be compiler dependent but; What is the expected output of the lines below? Would a compiler fill the Most Significant Bits with z ...
Suppose I have the following data structure: Now I want to initialize an array of mydata_t. I could do: This works, but is long. Alternatively, ...
How would I got about solving for the variable num, which would be my own input to the program, in the compare function? main function (part) comp ...
Coding C in VS Code on Linux. I use; signal(SIGINT, myhandler); signal(SIGHUP, myhandler); signal(SIGKILL, myhandler); signal(SIGTERM, myhandler) ...
As an exercise i'm writing a C function to read content from a file descriptor one line at a time. In the exercise i'm only allowed to use read(), mal ...
Given 3 doubles x, y and z, I make a lot of such printf calls: printf("[%+-8.3lf, %+-8.3lf, %+-8.3lf]\n", x, y, z); I then would like to have a mac ...
I have a problem with the code that does a binary search. As far as I know binary search is faster than linear search. I have a task on leetcode in wh ...
My goal here is to perform MergeSort on a dynamic array-like data structure I called a dictionary used to store strings and their relative weights. So ...
In The C Programming Language, 2nd Edition, by authors Brian W. Kernighan and Dennis M. Ritchie, they talk about declarators and direct-declarators. T ...
Im trying to learn doubly linked lists. I used the following to print: for reference my list struct only contains a pointer "head" and my node stru ...
I am reading C The Complete Reference 4th edition by Herbert Schildt. In Chapter 4 - Arrays and Strings, it mentions "One major reason for the additio ...
I am trying to write a program for gcd(Greatest Common Divisor),I know the code is really long and inefficient but still it should run. It is taking t ...
I'm a beginner in data structures with C, I have taken C programming but I've only touched a little bit on structures in the course and I have not kep ...
I was doing some testing and fiddling about and noticed the C preprocessor does not let me use unicode with the define directive. Below is an example ...
I am trying to exploit a buffer overflow vulnerability. To do so, I want to pass an address that was previously determined (such as \x00\x00\x41\xab\x ...
Im trying to print out the strings from a txt file in order. The pasted code just writes one and the same string over and over again, and I cant fo ...
The declaration of strtok_s in C11, and its usage, look to be very different from the strtok_s in compilers like the latest bundled with Visual Studio ...