I am building a Python wrapper for a C++ SDK in Python The app I am building on top of is using a console that is always listening to input on stdin Everything
I'm trying to understand what is behind this behaviour in my parent process. Basically, I create a child process and connect its stdout to my pipe. The parent p
I have this typedef and struct: typedef double mat[MAT_SIZE][MAT_SIZE]; typedef struct matList { char *name; mat *matrix; } matList; and I create an a
The venerable snprintf() function... int snprintf( char *restrict buffer, size_t bufsz, const char *restrict format, ... ); returns the number of characters it
this method is for trimming a string in C by deleting spaces from the beginning and end. BTW iam not that good with C and actually facing some issues with deald
How can i put this symbol (€) on the terminal using c. I've tried: printf("%c",0128); 0128 is the code on the ascii table but the compiller gives the error
I have a C code snippet which uses pipe() and fork() to communicate between parent and child process. I want to replicate it in Rust. For the POSIX APIs used in
I used xinu and i want to use single step Interrupt (01H). I have two questions does TF flag equal 1 (TF==1) when xinu system initialize ? if no then how i can
I have the following code, which is causing me a weird double to long conversion problem. Under the hood, logCpof just writes to a special log file, using vpri
I'm having troubles with a function in C using a string to reference a struct, the used code is included below int Search_name (char nombre[],Nentrada user_numb
I am currently trying to understand pointers in C but I am having a hard time understanding this code: int a[10]; int *p = a+9; while ( p > a ) *p-- = (
I could have sworn that I read that a string that was defined but not initialized was set to all NULLs. In other words, that char string[10]; consisted of 10 n
long time no coding in c and i'm a bit in trouble. I get tex from a file formatted like that: # 3 10 P1 16 3 P2 8 1 P3 10 2 from the second line every line re
I am trying to decompress a raw DEFLATE data stream in order to understand, how the DEFLATE decompression works. I don't care for performance at the moment. I j
I have to create a function that sum components of a vector this way: first + second, third + fourth, 5th + 6th, and so on. original vector has size "size". I h
related to Providing stdin to an emscripten HTML program? function stdin() { if (i < input.length) { var code = input.charCodeAt(i); +
I am doing all my assignments in a single .c file by writing functions, but now it seems that it affects the run time. Does it mean that if I do not call a func
I am new to programing, and I found one interesting but difficult to find reason problem, so I am writing this post. I was trying to write swap function: When I
I've the following code that I compile and run on Linux: #include <stdio.h> // can't be static void do_stuff(void) { ;; } typedef void (*func)(void)
Is it safe to use printf("%*s", len, ptr) where len is an integer and ptr is non-null terminated? If not safe, what will happen in the worst case? And then how