Top "C" questions

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

printf format for unsigned __int64 on Windows

I need to print a ULONGLONG value (unsigned __int64). What format should i use in printf ? I found %llu in …

c++ c windows printf unsigned
Valgrind: Invalid read of size 1

I'm having an issue with valgrind: This is my program (well the main part where the errors appear): int main() { …

c pointers valgrind
How to go from fopen to fopen_s

Visual Studio is complaining about fopen. I can't find the proper syntax for changing it. I have: FILE *filepoint = (fopen(…

c++ c windows c11 tr24731
Why can't we initialize members inside a structure?

Why can't we initialize members inside a structure ? example: struct s { int i = 10; };

c struct initialization member
Need help using qsort with an array of structs

Now, I have seen various examples, but I don't get what they mean. Here's my structure typedef struct profile{ char …

c arrays struct qsort
c )make error& link problem: i386:x86-64 architecture of input file, incompatible with i386 output

I have this output with error message when i type "make" in terminal!! gcc test1.o dispatchQueue.o -o test1 …

c makefile compiler-errors linker-errors incompatibletypeerror
Pointer expressions: *ptr++, *++ptr and ++*ptr

Recently I have come across this problem which I am unable to understand by myself. What do these three Expressions …

c++ c pointers increment
Printing file permissions like 'ls -l' using stat(2) in C

I am trying to write a small C program that emulates the unix command ls -l. To do so, I …

c stat
Difference between int main() and int main(void)?

What does the following mean : int main(void) {...} VS int main() {...} ? I think that int main() {...} means that main doesn't …

c main void
What is the difference between exit() and abort()?

In C and C++, what is the difference between exit() and abort()? I am trying to end my program after …

c++ c error-handling exit abort