I'm working on a code where I use linked list to accept a string data and put it into a main list and specific list where the data belongs. I'm having trouble o
This is the algorithm for traversing a matrix in spiral fashion and printing the traversal as an array in Python: def spiralTraverse(array): result = []
#include <stdio.h> int max_of_four(int, int, int, int); int main() { int a, b, c, d; scanf("%d %d %d %d", &a, &b, &c
I'm doing a school project, and my focus is to copy several lines of a text file to an arrays of strings and then ask to the user which string they want to remo
Lets say I have a code.c with two ordinary functions outer and inner.outer calls inner. I use GCC 11.2 on Linux, x86-64. If I compile a shared lib withgcc -shar
I'm trying to learn C and I have an asignment to use malloc and struct and I have it print out the queue number but the string wont print. I have attached a pic
I am trying to re-write a piece of C code into Go and I stumbled upon a static variable. I am wondering how I can achieve the Go's equivalent
I am trying to access an element using temp_param->mat_ptr[0][0] but it produces an error Format specifies type 'int' but the argument has type 'int *'. What
For example, given a function void func(const int* a, int* b){ *b = 2 + *a; } Should I emmit the const if func is often called like so: func(ptr, ptr) ?
I'm currently practising C and learning pointers and arrays. I watched a tutorial where the instructor changed the function from int aFunction() to void aFuncti
If in C I write: int num; Before I assign anything to num, is the value of num indeterminate?
I have a problem with my Allegro 5 code. It has three, sections, a section that checks for inputs, then a section that runs every 1/30th of a second with a time
I am trying to understand more about how CPU cache affects performance. As a simple test I am summing the values of the first column of a matrix with varying nu
I am new to MPI programming and I am trying to create a program that would perform 2-way communication between processes in a ring. I was getting MemoryLeaks er
How do I set the value of correct to 1 with an buffer overflow exploit? When I pass nothing to this the value of temper is 4D2 which is hex for 1234, but when I
Summary I want to write a simple Linux Kernel Module, which will initialize a GPIO from information it got from device tree. But currently my module never enter
I have been set an assignment where I am to find vulnerabilities in the code however I don't seem to be able to find one. I am very new to C and have the basic
Problem I want to get input from a file of unknown length, separating the input to strings at a defined delimiter and saving some of them. After reading the ent
This c code I wrote below to centre text in strings works. I cannot find an explanation of what "%%%ds" in the program means and how it works. There is d for in
For this program I need to "grab the start time of the entire process within the max. time precision avail including nanoseconds." in the format: April 9, 2022