Let k be a positive integer. Is it possible to find out the value of 3^k in mod 1000000007? I have written a C program code to do this but it gives a message on
i want to read from the file using fgets and send the information to struct in array so i write this code but the output in incorrect this is the file i tried t
I have a string that I want to execute in C file and I'd like to get the string from standard input. echo "Here is some random text.\n" | ./ma
I have this assignment for college where i recieve the matrix A and i need to create the matrix B, where in each cell there whould be the neighbor's average of
In plain C, pointers to void are useful as arguments to generic functions, such as a generic quicksort, or a generic swap, etc., as seen here: Implementation of
I have read that converting a function pointer to a data pointer and vice versa works on most platforms but is not guaranteed to work. Why is this the case? Sho
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