I am working with the xinu embedded operating system in c. I created a new header file and declared a struct: struct callout { uint32 time; /* Time of d
I have difficulties to understand the icon system in GTK 4 (I work in C language). In GTK 2 and 3 that was easy to instruct the OS about the icon to use for dis
TLDR; Does the following code invoke undefined (or unspecified) behaviour ? #include <stdio.h> #include <string.h> void printme(void *c, size_t n
I am trying to build a C ELF binary on linux and try to execute it directly on another machine. (Sent via scp linux command) The problem is that even when I bui
Code : #include<stdio.h> #include<malloc.h> typedef struct tree { char data; struct tree *left; struct tree *right; }*pos; pos stack[
I am pretty new to the pipe(), fork() functions and /bin. I would like to pass a value through a pipe from my first child to my second child that I will later u
I'm currently trying to make a programm to read a serial port. On this port I receive data with a baud rate of 875000. It's really uncommon and I don't succeed
I'm trying to connect two programs I wrote- one is a c program that outputs files to my local disk and the other is a web program that's supposed to show the co
Well, I've met this question a lot in OS, we've implemented this by diff. ways (Inline Assembly with setvect, getvect, etc..) At XINU it's a little bit differe
How can I create a new folder for an email manager, I have this code but It doesn't work. void create_folder() { int check; char * dirname; clrscr();
I am trying to add some stuff to Linux task_struct. In this area I copy a string from the user and try to store it in my struct. I try to debug my code by add
I spent the last days trying to figure out how to download a file from an URL. This is my first challenge with socket and I'm using it to have an understanding
I have started programming practice on codechef and have been confused by the difference between C and C99. What does C mean here? Is it C89? Check the language
I have a shared library that I implemented and want the .so to call a function that's implemented in the main program which loads the library. Let's say I have
Read and understand the following code. Provide the correct input to have the program print the sentence: Exactly! Good Job. Before submitting your answer, plea
I read here that Intel introduced SSE 4.2 instructions for accelerating string processing. Quote from the article: The SSE 4.2 instruction set, first implement
I recently encounter a problem when I'm using netlink to transfer many data between userspace and kernelspace. For example, function in userspace releases a req
I have a 2D array called char **str (allocated by malloc). Lets say str[0] has the string "hello". How would I print that hex? I tried printf("%d\n", (unsigned
i'm reading an article about integer security . here's the link: http://ptgmedia.pearsoncmg.com/images/0321335724/samplechapter/seacord_ch05.pdf In page 166,th
It looks like it could have been, there are (at least in C99) length modifiers that can be applied to int: %hhd, %hd, %ld and %lld mean signed char, short, long