# C Programming Code Examples

## C > Code Snippets Code Examples

### Earth to Martian Years conversion

C Program to Find Sum of Array Elements -
Read elements in an array and find the sum of all elements of the array. C code find sum of elements of the array. Add elements of an array using for loop in C programming. Logic

C Program Sample Bubble Sort Algorithm -
Implementing bubble sort. Bubble sort is also known as sinking sort. This sorting algorithm compares each pair of adjacent items. Swaps them if they are in the Wrong Order, and this

Implementation for Deterministic Skip list -
Finding the smallest item in the tree. Return smallest item or 'INFINITY' if empty. Find the largest item in the tree. "Return the Largest" item or INFINITY if empty. Find item x in the

C Program to Check Strings is Palindrome -
Program example identify whether the string is palindrome or not using stack. Take a string as input. Store the string in the stack array. Check whether the string is palindrome or...

C++ Program to Implement Pairing Heap -
In this, Insert item x into the 'priority queue', maintaining heap order. Return a pointer to the node containing the new item. Find the 'smallest' item in the priority queue. Return

Check whether a number is Prime number -
Prime numbers are positive integers greater than 1 that is only divisible by 1 and self. For example: 2, 3, 5, 7, 11 etc... C program input number and check whether the number is...

Count Vowels & Consonants in a Sentence -
Take the sentence as input, store in the array sentence[] and Initialize the variables vowels, consonants and special to zero. Using if, else statements, check if the sentence has vowels

C++ Implements Queue using Linked List -
C++ program, "using iteration", implements the list of elements removed from the queue in first in first out mode using a Linked list. A linked list is an ordered set of data elements,