c program to find pythagorean triples?

int a,b,n; printf("Input Natural Number n (n<2,100,000,000) : "); scanf("%d",&n); for(a=1;a<=100;a++) ...

C Convert char into char*?

I have a char that is given from fgets, and I would like to know how I can convert it into a char*. I am sure this...

In c, in bool, true == 1 and false == 0??

Just to clarify I found similar answer but for C++, I'm kinda new to coding so I'm not sure whether it applies to C ...

How to truncate C char*??

As simple as that. I'm on C++ btw. I've read the cplusplus.com's cstdlib library functions, but I can't find a simpl...

How I can print to stderr in C??

In C, Printing to stdout is easy, with printf from stdio.h. However, how can print to stderr? We can use fprintf to...

Openssl : error “self signed certificate in certificate chain”?

When I used openssl APIs to validate server certificate (self signed), I got following error : error 19 at 1 dep...

Understanding Byte swapping?

I'm trying to figure out a way to create a little endian/big endian conversion for 64 bit integers (uint64_t) and wh...

what do you mean by registering a callback function in C??

Can anyone please tell me what do we exactly mean by registering a callback function in C with some examples? I have...

C programming printing array of characters?

I have an array of characters declared as: char *array[size]; When I perform a printf("%s", array); it gives m...

How detect malloc failure??

What is the portable way to check whether malloc failed to allocate non-zero memory block? ...

String Padding in C?

I wrote this function that's supposed to do StringPadRight("Hello", 10, "0") -> "Hello00000". char *StringPadRig...

Why does getpid() return pid_t instead of int??

What's the logic behind calls like getpid() returning a value of type pid_t instead of an unsigned int? Or int? How ...

while (getchar () != '\n' );?

I have the following for loop, I am prompting the user to enter a 4 digit pin and hit enter. Can someone explain to ...