Top "C" questions

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

What is size_t in C?

I am getting confused with size_t in C. I know that it is returned by the sizeof operator. But …

c int size-t
How do I use extern to share variables between source files?

I know that global variables in C sometimes have the extern keyword. What is an extern variable? What is the …

c global-variables extern
How to printf "unsigned long" in C?

I can never understand how to print unsigned long datatype in C. Suppose unsigned_foo is an unsigned long, then …

c printf long-integer unsigned format-specifiers
warning: implicit declaration of function

My compiler (GCC) is giving me the warning: warning: implicit declaration of function Please help me understand why is it …

c compiler-warnings
what is Segmentation fault (core dumped)?

I am trying to write a C program in linux that having sqrt of the argument, Here's the code: #include&…

c
Fastest way to check if a file exist using standard C++/C++11/C?

I would like to find the fastest way to check if a file exist in standard C++11, C++, or C. …

c++ c file stream
Undefined reference to pthread_create in Linux

I picked up the following demo off the web from https://computing.llnl.gov/tutorials/pthreads/ #include <pthread.h&…

c linux multithreading pthreads
In C, how should I read a text file and print all strings

I have a text file named test.txt I want to write a C program that can read this file …

c file text-files
Split string with delimiters in C

How do I write a function to split and return an array for a string with delimiters in the C …

c string split
What is a segmentation fault?

What is a segmentation fault? Is it different in C and C++? How are segmentation faults and dangling pointers related?

c++ c segmentation-fault