You might also find this list useful both for your practical FOSS needs and study of C (or any other language therein), as most of them are published on version control servers like GitLab and GitHub, where you can easily check the language they're written in and start mastering your skills from there. For example, this will search through all the GitHub repositories for programs written in C only. You can try GitHub's Advanced Search tool to manipulate your search in a variety of ways. Also, check these: Simple programming problems Project-based tutorials in C Project-based learning C program examples for beginners Finally, make sure you have this one at your fingertips always! ;o) Hope it helps! Answer from Victor_Quebec on reddit.com
🌐
Programiz
programiz.com › c-programming › examples
C Examples | Programiz
The best way to learn C programming is by practicing examples. The page contains examples on basic concepts of C programming.
🌐
GeeksforGeeks
geeksforgeeks.org › c language › c-programming-examples
C Programs - C Programming Examples - GeeksforGeeks
July 23, 2025 - To learn anything effectively, practicing and solving problems is essential. To help you master C programming, we have compiled over 100 C programming examples across various categories, including basic C programs, Fibonacci series, strings, arrays, base conversions, pattern printing, pointers, and more.
Discussions

Example of a well written C Program?
check out the original git commit by Linus Torvald. Also, the source code of redis is considered by many to be very high quality C code. More on reddit.com
🌐 r/C_Programming
28
91
November 11, 2017
what are some tiny c programs I can play about with?
You might also find this list useful both for your practical FOSS needs and study of C (or any other language therein), as most of them are published on version control servers like GitLab and GitHub, where you can easily check the language they're written in and start mastering your skills from there. For example, this will search through all the GitHub repositories for programs written in C only. You can try GitHub's Advanced Search tool to manipulate your search in a variety of ways. Also, check these: Simple programming problems Project-based tutorials in C Project-based learning C program examples for beginners Finally, make sure you have this one at your fingertips always! ;o) Hope it helps! More on reddit.com
🌐 r/cprogramming
15
21
November 8, 2022
Concurrent programming (in C), with examples
“Notably macOS is stuck at an old version of POSIX. Presumably they’re too busy “innovating” with their keyboard touchbar to invest in operating system fundamentals.” Love it More on reddit.com
🌐 r/C_Programming
15
130
November 18, 2019
Can you suggest some good courses on C for a newbie?
The common recommendations I see in this subreddit is K&R "The C Programming Language" and "Modern C" books. But... (...) I always lacked the motivation to continue with projects after the course. This time it will be different. I would start with a careful evaluation of where the lack of motivation comes from. Otherwise, believe me, this time won't be different. Maybe you did not focus on the programming fundamentals enough and picked an overwhelmingly complicated project which quickly demotivated you with its complexity? Maybe you were jumping from one tutorial to another without an actual attempt to understand what the for-loop or variable is? Maybe you were vacantly copy-pasting tutorial examples and then stuck for a few hours on the trivial bugs, because of mentioned lack of fundamentals? Or, maybe you spent 10h a day on programming without giving enough time to rest? Start small. Be ready to step back and scale down. Be patient and do not rush. More on reddit.com
🌐 r/C_Programming
10
8
November 10, 2021
🌐
W3Schools
w3schools.com › c › c_examples.php
C Examples
Create an integer variable and print it Combine both text and a variable Change/overwrite variable values Add a variable to another variable Declare many variables of the same type with a comma-separated list Assign the same value to multiple variables of the same type Real-life variables example Variables Explained
🌐
Sanfoundry
sanfoundry.com › c-programming-examples
C Programming Examples | C Programs - Sanfoundry
December 19, 2022 - These C Programming examples are categorized as data types, array, pointers, matrix, bitwise operations, control flow statements, math functions, file handling, factorial and Fibonacci series, palindrome, strings, searching, Sorting, etc.
🌐
Reddit
reddit.com › r/c_programming › example of a well written c program?
r/C_Programming on Reddit: Example of a well written C Program?
November 11, 2017 -

I'm currently learning C, and I'm reading all kinds of best pratices and tips on how to have a clean code and such, but I'd like to see it all in action on a full program. I'm looking for something mid-sized, not enormous but still something with multiple source files that you think is well written.

I wanna have a feel for file dimensions, good documentation, variable names, error handling and anything you can think of. It can be about anything, i'm intrested in the structure, not the contents. Thank you for your help.

🌐
BeginnersBook
beginnersbook.com › 2015 › 02 › simple-c-programs
Ultimate Collection of C Programs: Source Code with Outputs
Here we are sharing C programs on various topics of C Programming such as array, strings, series, area & volume of geometrical figures, mathematical calculation, sorting & searching algorithms and many more. Our aim is to provide you the perfect solution of all the C programming questions that you may have either faced during interviews or in class assignments.
Find elsewhere
🌐
Codeforwin
codeforwin.org › home › c programming examples, exercises and solutions for beginners
C programming examples, exercises and solutions for beginners - Codeforwin
January 14, 2023 - Fundamentals Hello world program in C Basic input/output Basic IO on all data types Perform arithmetic operations Find area and perimeter of rectangle Find diameter and area of circle Find area of triangle Find angles of triangle Temperature ...
🌐
Onlinegdb
learn.onlinegdb.com › c_program_examples
C Program Examples | Learn Programming step by step
We have prepared example C program along with explanation about how program works. It will help you understand logic behind programming in simplest way. If you want to add any program which is not listed over here, write us through contact form.
🌐
C by Example
cbyexample.com
C by Example | Learn the basics of C and C++
Memory can be allocated on the heap, an unreserved and relatively large region of memory outside of the program’s memory scope.
🌐
WsCube Tech
wscubetech.com › resources › c-programming › programs
C Programs (Code Examples With Output)
Below is an ultimate collection of C language programs designed to help you master programming fundamentals. We have curated plenty of C program examples, each with explanations, sample outputs, and step-by-step guides.
🌐
Developer Insider
developerinsider.co › c-programming-language-example-by-topics
C Programming Language Example Collection
June 16, 2025 - C Programming Language Example on various topics like - Introduction, Operator, If-else, Switch-case, Structure, String, Pointer, File Handling, Loops etc.
🌐
PW Skills
pwskills.com › blog › cpp › examples of c: simple c programs for beginners (with output)
Examples Of C: Simple C Programs For Beginners (With Output)
4 weeks ago - Explore the best examples of C with simple C programs for beginners. Includes basic C programs, practice questions, and solved outputs to help you learn C easily.
🌐
Quora
quora.com › What-does-C-code-look-like-in-a-real-life-example
What does C code look like in a real life example? - Quora
Answer: Here is an example of a ... and prints the result: [code] #include int main() { int num1, num2, sum; printf("Enter first number: "); scanf("%d", &num1); printf("Enter second number......
🌐
Emertxe
emertxe.com › home › advanced c programming | course home › advanced c programming | sample programs
Advanced C Sample Programs | C Programming Examples
January 30, 2024 - A simple program exploring the basic C data types. C supports two basic datatypes hold integral and real objects as int and float (single precision). The char falls under the integral category. Any variable defined with integral datatypes can be modified for its signedness and width properties. This example demonstrates the sign modification.
🌐
GeeksforGeeks
geeksforgeeks.org › c language › callbacks-in-c
Callbacks in C - GeeksforGeeks
Invoke the Callback Function: Inside the receiving function, the callback function is called using the function pointer. The following examples demonstrate how to use callback functions in C.
Published   July 26, 2025
🌐
W3Schools
w3schools.com › c › c_real_life_examples.php
C Real-Life Examples
Use a for loop to create a program that prints the multiplication table of a specified number (2 in this example):
🌐
Tutorial Gateway
tutorialgateway.org › c-programming-examples
C Programming Examples
April 28, 2025 - The List of C Programming examples on Area, Volume, Array, Matrix Programs, Series, Number, String, Sort, Display Patterns, Shapes, etc
🌐
Cplusplus
cplusplus.com
CPlusPlus.com
Description of the most important classes, functions and objects of the Standard Language Library, with descriptive fully-functional short programs as examples.
🌐
Quora
quora.com › What-are-some-examples-of-beginner-programs-written-in-C
What are some examples of beginner programs written in C? - Quora
Answer: the “hello world” is a classic i did one to generate BINGO cards easy but some complexities a reverse polish calculator is easy a function to report if a year is a leap year a function to tell if exactly 1 bit in a number is set [i.e. power of 2]