SQL Practice
sqlpractice.co.in
Languages Learn Practice Playground Interview
Run code
Languages Learn Practice Playground Interview SQL Search
Home / C / Practice

C exercises

Exercises with full test sets for C are being written and verified. Until they are published, every lesson ends with a short program to write, with its expected output.

  • C Syntax and Your First ProgramThe parts of a C program: #include, int main(void), statements, braces, comments and printf, plus how gcc turns the source file into a program you can run.8 minCompleted
  • Variables and Types in CDeclaring C variables and choosing types: int, long, double, char and bool, sizeof, why uninitialised variables hold garbage, and printf and scanf specifiers.9 minCompleted
  • Operators in CC arithmetic, comparison, logical, assignment and increment operators: why 7 / 2 is 3, how % behaves, what comparisons return, precedence and = versus ==.9 minCompleted
  • Conditions in C: if, else and switchHow C chooses between branches with if, else if, else and switch: what counts as true, combining tests with && and ||, and why each switch case ends with break.9 minCompleted
  • Loops in C: for, while and do-whileThe three C loops and when each fits: how a for loop's three parts run, reading input until it ends with while and scanf, and using break and continue safely.9 minCompleted
  • Functions in CHow to define and call C functions: prototypes before the first call, arguments copied by value, void functions, early returns and local variables.10 minCompleted
Exercises in other languagesC lessons
SQL Practice

Free tutorials, exercises and browser-based playgrounds for SQL, Python, JavaScript and more. Every example was run before it was published; your code runs on your own device.

Learn

  • All languages
  • Learning paths
  • Free SQL course
  • SQL beginner's guide
  • SQL glossary
  • Interview preparation

Practice

  • All exercises
  • SQL exercises
  • Guided projects
  • Code playground
  • SQL playground
  • Search

Site

  • About
  • How we verify
  • Contact
  • Privacy Policy
  • Terms of Use
  • Open Source Licenses
  • Disclaimer
© 2026 SQL Practice. Your code runs locally in your browser. RSS feed