# C Programming Code Examples

## C > Strings Code Examples

### C program to count occurrences of a character in a string

Code to find Sum of Digits using recursion -
Write a Recursive Function in C Language to calculate sum of digits of a number. Declare Recursive Function to find sum of digits of a number. First give a meaningful name to the

C Finds Cube of a Number using Function -
C Program code input any number from user and find cube of the a number using function. Lets assign meaningful name to the function, say cube(). Function should accept a number

C++ language Program to Implement Trie -
Program demonstrates the implementation of Trie. Trie node base declaration. Trie node declaration. Trie class declaration. Insert trie node. Destroy trie. Trie traversal. Clustering

How to Call a Function in C Programming? -
Call a function in C Language. A function is a block of statements that performs a specific task. Suppose you are building an application in C Language and in one of your c code, you

C Print the Alternate Nodes in a Linked list -
C Language program print code the alternate nodes in a linked list without using recursion. This C program, using iteration, displays the alternate nodes in a linked list. A linked list is

Program Checks if Number is Even or Odd -
If a number is exactly divisible by 2 then its an even number else it is an odd number. In this we have shared 2 ways to check whether the input number is even or odd. Using Modulus

Lets Learn String Functions in C Language -
Find the "Length of str1". Increment count till we reach the Terminating character. Find the "Length of str2". Check that we have enough 'space' for both strings. Copy 2. string to end

Program Finds Sum of First and Last Digit -
C Language Program to input a number and find sum of first and last digit of the number using for loop. Input a number. Find last digit. Find total number of digits - 1. Find first digit.