Skip to content
Circuit

C program examples

Small programs you can understand, run, and change. Each example includes its logic, sample output, and the concepts to watch.

“Try in Circuit” opens a new saved copy. Your existing programs stay intact. Interactive examples accept input in the terminal; sample responses shown on each page are for you to enter.

Basic Programs

Conditions

Loops

Functions

Arrays

Strings

Pointers

Structures

File Handling