Top "C" questions

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

What is the argument for printf that formats a long?

The printf function takes an argument type, such as %d or %i for a signed int. However, I don't see …

c printf long-integer
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 …

c string integer
What is the "-->" operator in C++?

After reading Hidden Features and Dark Corners of C++/STL on comp.lang.c++.moderated, I was completely surprised that …

c++ c operators code-formatting standards-compliance
How can I get a file's size in C?

How can I find out the size of a file I opened with an application written in C ? I would …

c file size
How do function pointers in C work?

I had some experience lately with function pointers in C. So going on with the tradition of answering your own …

c function-pointers
How do I restrict a float value to only two places after the decimal point in C?

How can I round a float value (such as 37.777779) to two decimal places (37.78) in C?

c floating-point decimal
How do you format an unsigned long long int using printf?

#include <stdio.h> int main() { unsigned long long int num = 285212672; //FYI: fits in 29 bits int normalInt = 5; printf("My …

c syntax printf format-specifiers long-long
MIN and MAX in C

Where are MIN and MAX defined in C, if at all? What is the best way to implement these, as …

c max min c-preprocessor
What is the printf format specifier for bool?

Since ANSI C99 there is _Bool or bool via stdbool.h. But is there also a printf format specifier for …

c++ c boolean printf
typedef struct vs struct definitions

I'm a beginner in C programming, but I was wondering what's the difference between using typedef when defining a structure …

c struct typedef