Top "C" questions

C is a general-purpose programming language used for system programming (OS and embedded), libraries, games and cross-platform.

Understanding INADDR_ANY for socket programming

I am trying to program some sockets and so, on the server side, I use htonl(INADDR_ANY). To the …

c sockets
Work on a remote project with Eclipse via SSH

I have the following boxes: A Windows box with Eclipse CDT, A Linux box, accessible for me only via SSH. …

c eclipse ssh eclipse-cdt remote-debugging
Static variable inside of a function in C

What will be printed out? 6 6 or 6 7? And why? void foo() { static int x = 5; x++; printf("%d", x); } int main() { foo(); …

c static
C compile error: "Variable-sized object may not be initialized"

Why do I receive the error "Variable-sized object may not be initialized" with the following code? int boardAux[length][length] = {{0}};

c compiler-errors initializer-list variable-length-array
How to list physical disks?

How to list physical disks in Windows? In order to obtain a list of "\\\\.\PhysicalDrive0" available.

c windows winapi hard-drive
How to kill a child process by the parent process?

I create a child process using a fork(). How can the parent process kill the child process if the child …

c fork kill
What's the Use of '\r' escape sequence?

I have C code like this: #include<stdio.h> int main() { printf("Hey this is my first hello …

c++ c escaping carriage-return
C fopen vs open

Is there any reason (other than syntactic ones) that you'd want to use FILE *fdopen(int fd, const char *mode); …

c linux unix file-io fopen
Return char[]/string from a function

Im fairly new to coding in C and currently im trying to create a function that returns a c string/…

c arrays string char return
How to compile .c file with OpenSSL includes?

I am trying to compile a small .c file that has the following includes: #include <openssl/ssl.h> #…

c linux compiler-construction openssl compiler-errors