Top "C" questions

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

Pinging from a C/C++ program

I want to write a C or C++ program, that given an IP address, Pings it and then performs further …

c++ c network-programming ping
c get nth byte of integer

I know you can get the first byte by using int x = number & ((1<<8)-1); or int x = …

c byte shift bit-shift
How to find the length of argv[] in C

#include <stdio.h> #include <stdlib.h> #include <string.h> int main(int argc, char *…

c argv strlen strcat
What does '#include <stdio.h>' really do in a C program

I am new to c programming and I was coding some simple programs "Hello world" style. In all of these …

c include stdio
How to understand the pointer star * in C?

I'm struggling with the pointer sign *, I find it very confusing in how it's used in both declarations and expressions. …

c pointers dereference
When should I use perror("...") and fprintf(stderr, "...")?

Reading the man pages and some code did not really help me in understanding the difference between - or better, …

c stderr
Image scaling and rotating in C/C++

What is the best way to scale a 2D image array? For instance, suppose I have an image of 1024 x 2048 …

c++ c image image-scaling
memcpy(), what should the value of the size parameter be?

I want to copy an int array to another int array. They use the same define for length so they'll …

c arrays sizeof memcpy
What is the maximum number of characters for a host-name in Unix?

I am wondering what is the maximum number of characters for a host-name in a Unix system. In addition is …

c unix max hostname
Is there a 128 bit integer in gcc?

I want a 128 bit integer because I want to store results of multiplication of two 64 bit numbers. Is there any …

c gcc x86-64 bigint 128-bit