Bind failed: Address already in use?

I am attempting to bind a socket to a port below: if( bind(socket_desc,(struct sockaddr *) &server, sizeof(se...

Difference between size_t and unsigned int??

I am so confused about size_t. I have searched on the internet and everywhere mentioned that size_t is an unsigned t...

Stack smashing detected?

I am executing my a.out file. After execution the program runs for some time then exits with the message: **** stac...

Reaching EOF with fgets?

I'm writing a function that perform some authentications actions. I have a file with all the user_id:password:flag c...

How to convert an int to string in C??

How do you convert an int (integer) to a string? I'm trying to make a function that converts the data of a struct in...

Creating a grid in c?

I need to create a 375 x 375 grid in c, and I need to create a grid of 25 (5x5) poles that will be spaced 75 (375/5)...

Shared memory in C - getting NULL when I try to access my structure with a char array in it?

I'm trying to wrap my mind around the concept of shared memory by making a multiprocessed application that will util...

Why does printf not flush after the call unless a newline is in the format string??

Why does printf not flush after the call unless a newline is in the format string? Is this POSIX behavior? How might...

Serial communication in C?

I am trying to write a simple application to read out a current value from a Keithley 6485 picoammeter, connected vi...

How to use timer in C??

What is the method to use a timer in C? I need to wait until 500 ms for a job. Please mention any good way to do thi...

Reading numbers from a text file into an array in C?

I'm a programming noob so please bear with me. I'm trying to read numbers from a text file into an array. The text ...

What is this GCC error on Linux, and how do I solve it? gcc: internal compiler error: Illegal instruction (program as)?

I type gcc hello.c and this appears: gcc: internal compiler error: Illegal instruction (program as) Please submit a ...

How does one represent the empty char??

I'm currently writing a little program but I keep getting this error when compiling error: empty character const...

What is “pch.h” and why is it needed to be included as the first header file??

#include "pch.h" #include <stdio.h> #include <string.h> What is "pch.h"? Why is it needed to be includ...