I used this code to read file. But fread function always return 0. What is my mistake? FILE *file = fopen(pathToSourceFile, "rb"); if(file!=NULL) { char a
I would like to know is it possible to do memcpy by bits instead of bytes? I am writing a C code for Ethernet frame with VLAN tagging, in which I need to fill
Is is just possible to draw a simple dotted line using SDL2 (or with gfx) like int drawDottedLine(SDL_Renderer *renderer,Sint16 x1,Sint16 y1, Sint16 x2, Sint1
I'm writing a loadable kernel module and trying to test it. After inserting it I was trying to remove it using rmmod xxx command, but I get an error saying modu
I'm trying to learn how to use SDL_TTF library. But i'm unable to solve an error of type : undefined reference to "TTF_INIT" here is the simple code that im t
I am making generated shapes in a fragment shader and part of it involves drawing the border between objects ie the dividing line between them. Currently I have
What is difference between return and exit statement in C programming when called from anywhere in a C program?
What's the best way to achieve compile time static asserts in C (not C++), with particular emphasis on GCC?
I am trying to calculate 100! (that is, the factorial of 100). I am looking for the simplest way to accomplish this using C. I have read around but have not fou
How to find the length of the longest consecutive bit string(either 1 or 0)? 00000000 11110000 00000000 00000000 -> If it is 0 then length will be 20 111
For example, in <ctype.h> there are functions like isalpha(). I want to know if writing an isalpha function on my own is faster than calling isalpha? Th
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun This is
I'm working on a project and I need to create an API. I am using sockets to communicate between the server (my application) and the clients (the other applicat
I'm working on an embedded DSP where speed is crucial, and memory is very short. At the moment, sprintf uses the most resources of any function in my code. I o
I am trying to run a simple C program but I am getting this error: warning: format ‘%s’ expects type ‘char *’, but argument 2 has ty
I'm working on an embedded DSP where speed is crucial, and memory is very short. At the moment, sprintf uses the most resources of any function in my code. I o
I am trying to run a simple C program but I am getting this error: warning: format ‘%s’ expects type ‘char *’, but argument 2 has ty
I am trying to implement the codes given in smashing the stack for fun and profit by Aleph to learn the basics of buffer overflow attacks. Machine architecture:
I am trying to implement the codes given in smashing the stack for fun and profit by Aleph to learn the basics of buffer overflow attacks. Machine architecture:
I am trying to implement the codes given in smashing the stack for fun and profit by Aleph to learn the basics of buffer overflow attacks. Machine architecture: