C Examples

This section contains a list of C examples.

How to implement your own atoi() function?

This program demonstrates how to implement your own atoi() function.

It uses iterative method (simplest way and easy to understand) for doing so.

You can compile this program on bOtskOOl Free Online C/C++ Compiler

Read More

C Examples

How do you reverse a singly linked list - iterative method?

This program demonstrates how to reverse a singly linked list.

It uses iterative method (simplest way and easy to understand) for doing so.

You can compile this program on bOtskOOl Free Online C/C++ Compiler

Read More

C Examples

Encryption-Decryption using -XOR operator

This C program demonstrates basic example on encryption and decryption of data using "exclusive OR operator" -XOR . You can use it to secure your data and other security stuff. The C example has been explained with comments and input/output screenshots.

Read More

C Examples

Selection Sort

This is an example C of program which demonstrates a type of sorting of an array known as SELECTION SORT.  We have provided input/output screenshots at the end of the code.

You can compile this program on bOtskOOl Free Online C/C++ Compiler

Read More

C Examples

To Display Prime Numbers From m to n

This is a C example to Display Prime numbers from m to n.

You can compile this program on bOtskOOl Free Online C/C++ Compiler

Read More

C Examples

Displaying a pyramid of stars

This is a C example to display a pyramid of stars. 

You can compile this program on bOtskOOl Free Online C/C++ Compiler

Read More

C Examples

Multiplying and adding two matrices

This is a C example which demonstrates how to multiply and add two matrices. 

Read More

C Examples

Converting a decimal number to its binary, octal and hexadecimal equivalent

This is a C program which demonstrates how to convert a decimal number to its binary, octal and hexadecimal equivalent. 

You can compile this program on bOtskOOl Free Online C/C++ Compiler.

Read More

C Examples

Finding factorial of a number using recursion

This C example shows how to find the factorial of a number using recursion. 

Read More

C Examples

Check whether a year is a leap year or not

This C example program shows how to check whether a given year is a leap or not. 

You can compile this program on bOtskOOl Free Online C/C++ Compiler

Read More

C Examples

Finding highest common factors of numbers

This C program demonstrates how to calculate HCF highest common factors of 'n' numbers.

Read More

C Examples

Fibonacci Series using Recursion

This is C program to print  fibonacci series using recursion.

Read More

C Examples

Count spaces, vowels, consonants and digits in a file

This is a C program to count spaces ,vowels, consonants, digits in a file and write it at te end of the file.

You can compile this program on bOtskOOl Free Online C/C++ Compiler

Read More

C Examples

Convert tempature from celsius to fahrenheit

This is a C program to convert temperature from Celsius to Fahrenheit

You can compile this program on bOtskOOl Free Online C/C++ Compiler

Read More

C Examples

Bubble Sort

This is a C program to demonstrates a type of sorting of an array known as BUBBLE SORT.

You can compile this program on bOtskOOl Free Online C/C++ Compiler

Read More

C Examples

Copy one array into another in Reverse Order

This is C program to demonstrate how to copy one array into another in reverse order.

 

You can compile this program on bOtskOOl Free Online C/C++ Compiler

Read More

C Examples