# C Programming Code Examples

## C > Mathematics Code Examples

### C Program to Find the Nth Fibonacci Number using Recursion

Pass Structure as an argument to Function -
We have a function 'printStudentInfo()' which takes structure Student as an 'argument' and 'prints the details' of student using structure varaible. The important point to note here is

The Mind Reader game C Coding example -
Choose a two digit number and add digits. Subtract the sum from original number. See the symbol opposit to the number you got. Press any key The MIND READER will display

C programming Scanf() Format Specifiers -
Read a floating-point value, read a single character, read a decimal integer, read an integer in either decimal, octal, hexadecimal format, read a floating-point number, read a

C Code to Illustrate the Concept of Unions -
C Define the union named number with two variables j1 and j2. Define the union variable x. Take the value of two variables using dot operator(i.e. x.j1, x.j2) as input. Print values

Sum of Natural numbers using While loop -
Find the sum of natural numbers using While Loop. When you use while loop, you have to initialize the loop counter variable before the Loop & Increment or Decrement it inside the

Example Sort an Array in decending order -
C Programming example code to sort an array in decending order. Enter number of data (maximum 100). Enter data (in integer). Your array in decending order is as follows:

C Programs Calculates the Area of a Circle -
C Language Program calculates the Area of a Circle given it's Radius. Lets use The formula to compute the 'area' is: Area = ? x r2 where r is the radius of the circle & ? value is 22/7. 'Pi'

C Program Code Checks Vowel Consonant -
C Programming Language check whether an alphabet is Vowel or Consonant using if else. English alphabets a, e, i, o, u both lowercase & uppercase are known as vowels. Alphabets