Tagged: c

About c : Order-of-execution-of-print-with-pthreads-in-Linux

Question Detail I’m using C and I want to get the String “ABCABCABCABCABCABC” in the output screen through multithreading, one thread does the ‘A’ character, another ‘B’ and the third one ‘C’. If I...

About c : CMake-cant-find-the-header-from-the-PICO-SDK

Question Detail So I’ve been struggling for hours and I can’t find the solution to my problem. A more detailed description of the problem is as follows: So, I created a “blinking LED” example...

About c : Declare-pointered-struct-at-build-time

Question Detail This is how I can initialize a struct with pointers at build time. struct example_struct { int count; int *values; }; int i1[] = { 1, 2 }; int i2[] = {...

About c : lock-file-on-linux-and-if-lock-successful-become-daemon

Question Detail I want to write program that becomes daemon on demand: if_there_are_no_daemon_alive_start_daemon(); pass_job_to_daemon(); and I stuck on implementation of if_there_are_no_daemon_alive_start_daemon. At first I think of trying to lock file /run/lock/my-unique-name.lck, and if succeeded...

About c : Caesar-cipher-program-written-in-C-has-a-bug

Question Detail I wrote a program for cs50 that’s supposed to take in a (integer)’key’ (at run-time) and output a prompt for ‘plaintext’ which will then output an encrypted version of the plaintext according...