函数是执行特定任务的代码块。
您将在本文中找到与功能相关的示例。要了解此页面中的示例,您应该了解以下主题:
- 用户定义功能
- 用户定义函数的类型
- 局部变量的范围
- 递归
C函数示例
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 |