Python JavaScript SQL HTML R C C++ Java RUST Golang Kotlin Swift C# DSA

Learn C practically
and Get Certified.

ENROLL

Popular Tutorials

Data Types in C
C if...else Statement
C for Loop
Arrays in C Programming
Pointers in C
Start Learning C

Popular Examples

Check odd/even number
Find roots of a quadratic equation
Print Pyramids and Patterns
Check prime number
Print the Fibonacci series
Explore C Examples

Reference Materials

string.h
math.h
ctype.h
View all
Learning Paths
Challenges

Learn C Interactively

Try for Free

Courses

Interactive Python Course
Interactive SQL Course
Interactive Java Course
View all Courses
  • Interactive C Course

  • C Introduction

    • Keywords & Identifier
    • Variables & Constants
    • C Data Types
    • C Input/Output
    • C Comments
    • C Operators
    • C Introduction Examples
  • C Flow Control

    • C if...else
    • C for Loop
    • C while Loop
    • C break and continue
    • C switch...case
    • C Programming goto
    • Control Flow Examples
  • C Functions

    • C Programming Functions
    • C User-defined Functions
    • C Function Types
    • C Recursion
    • C Storage Class
    • C Function Examples
  • C Programming Arrays

    • C Programming Arrays
    • C Multi-dimensional Arrays
    • C Arrays & Function
  • C Programming Pointers

    • C Programming Pointers
    • C Pointers & Arrays
    • C Pointers And Functions
    • C Memory Allocation
    • Array & Pointer Examples
  • C Programming Strings

    • C Programming String
    • C String Functions
    • C String Examples
  • Structure And Union

    • C Structure
    • C Struct & Pointers
    • C Struct & Function
    • C Unions
    • C struct Examples
  • C Programming Files

    • C Files Input/Output
    • C Files Examples
  • Additional Topics

    • C Enumeration
    • C Preprocessors
    • C Standard Library
    • C Programming Examples

C Topics

  • C Control Flow Examples
  • Check Prime or Armstrong Number Using User-defined Function
  • Check Whether a Number can be Expressed as Sum of Two Prime Numbers
  • String Examples in C Programming
  • Convert Binary Number to Octal and vice-versa
  • Find Factorial of a Number Using Recursion

C Function Examples

A function is a block of code that performs a specific task.

You will find examples related to functions in this article. To understand examples in this page, you should have the knowledge of the following topics:

  1. User-Defined Function
  2. Types of User-defined functions
  3. Scope of a local variable
  4. Recursion

C Function Examples

Display all prime numbers between two Intervals
Check prime and Armstrong number by making functions
Check whether a number can be expressed as the sum of two prime numbers
Find the sum of natural numbers using recursion
Calculate the factorial of a number using recursion
Find G.C.D using recursion
Reverse a sentence using recursion
Calculate the power of a number using recursion
Convert a binary number to decimal and vice-versa
Convert an octal Number to decimal and vice-versa
Convert a binary number to octal and vice-versa
Previous Tutorial:
C Storage Class
Next Tutorial:
C Programming Arrays
Share on:
Did you find this article helpful?

Sorry about that.


Related Tutorials

C Tutorial

C Control Flow Examples

C Tutorial

String Examples in C Programming

C Tutorial

C Recursion

C Tutorial

C Struct Examples

We Want To Hear From You!
Learn to Code Survey

ChatGPT is transforming programming education. How has it impacted your learning journey?

Take our 15-min survey to share your experience with ChatGPT.

CLICK TO PARTICIPATE