Top "C" questions

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

%i or %d to print integer in C using printf()?

I am just learning C and I have a little knowledge of Objective-C due to dabbling in iOS development, however, …

c console integer int printf
How do I read a string entered by the user in C?

I want to read the name entered by my user using C programmes. For this I wrote: char name[20]; printf("…

c stdin
gdb: "No symbol table is loaded"

I keep getting this error mesage when trying to add a breakpoint in gdb. I've used these commands to compile: …

c gdb
C - function inside struct

Im trying to create a function inside a structure, so far i have this code: typedef struct client_t client_…

c function struct
How to split a string to 2 strings in C

I was wondering how you could take 1 string, split it into 2 with a delimiter, such as space, and assign the 2 …

c string strtok
Read int values from a text file in C

I have a text file that contains the following three lines: 12 5 6 4 2 7 9 I can use the fscanf function to read the …

c file file-io scanf line
How do I check if a variable is of a certain type (compare two types) in C?

In C (not C++/C#) how do I check if a variable is of a certain type? For example, something …

c types struct
How to get the string size in bytes?

As the title implies, my question is how to get the size of a string in C. Is it good …

c sizeof arrays
What is the difference between printf() and puts() in C?

I know you can print with printf() and puts(). I can also see that printf() allows you to interpolate variables …

c string output printf puts
Catch Ctrl-C in C

How does one catch Ctrl+C in C?

c signals