# C Programming Code Examples

## C > For Loops and While Loops Code Examples

### Program to find sum of first and last digit without using loop

C Program Codes Find Reverse of an Array -
C program to read elements in an array and find its reverse. C Program to print reverse of an array. There are various ways to reverse an array. The basic three algorithms to reverse a

Frequency of Characters in a C-style String -
In this example, 'frequency of characters' in a String object is computed. To do this, "size()" function is used to find the Length of a string object. Then, the for loop is iterated until the

Program Finds Prime Factors of a Number -
Factors of a number that are prime numbers are called as "Prime Factors" of that number. For example: 2 and 5 are the prime factors of 10. Logic to check prime factors of a number.

Convert Uppercase Character to lowercase -
To convert "from uppercase to Lowercase" in 'C++', enter character in uppercase to convert it into 'Lowercase' and display the equivalent character in lowercase. To change uppercase

Program for Beginners: Area of Rectangle -
A plane figure with 4 sides & 4 right angles & having Equal Opposite sides. Adjucent sides makes an Angle of 90 degree. Just compute the area of a Rectangle if you know its length

C++ Program use Linear Search Technique -
First ask to enter the array size then it will ask to enter the array elements, then it will finally ask to enter a number to be search in array to check whether it is present in the array or not

Check Vowel or Consonant use switch case -
Program to check Vowel or Consonant using switch-case statement. I already explained in sample to print number of days in months, if switch case contains same action for multiple

C Sample Code Prints the Pascal's Triangle -
Pascal's triangle is one of the classic example taught to "engineering students". It has many interpretations. One of the famous one is its use with bionomial equations. The triangle is