# C Programming Code Examples

## C > For Loops and While Loops Code Examples

Page 1 Page 2 Page 3

Page 1 Page 2 Page 3

C Reversal of a Singly Linklist by recursion

Function for inserting an element into a list. Function for displaying the list. Function for reversing the list by recursion. Stores the address of the first element. Also stores the

A Single Line Comment in C++ Language

Any words in a line after "//" are "ignored" by the compiler. if you want to write a comment about 'what is about code doing' you have to write it in the following way: The "//" symbols

C++ Program to Implement Vector in STL

C++ code to Implement Vector in STL. Insert element into the vector. Delete last element of the vector. "Size of the vector". Display by index. "Dislplay by iterator". Clear the vector

C Program Compare Strings Using StrCmp

C program to compare two strings using loop character by character. Logic to compare two strings. Input two strings from user and Store it in some variable say str1 and str2. Compare

Given the coordinates of the vertices of a convex polygon, calculate its area and perimeter. Subdivide it into triangles and calculate the area of each triangle with the

C Codes Sort Even Odd Elements of Array

C program to input elements in an array from user and sort all even and odd elements of the given array separately without using any other array. If minimum element of the array

C Programs Calculates Standard Deviation

C Language calculateSD() function calculates the Standard Deviation. The array containing 10 elements is passed to the function and this function calculates the Standard Deviation &

C Program Code Finds Area of a Rectangle

Input length and width of a rectangle and find area of the given rectangle. How to calculate area of a rectangle in C programming. Input length and width of rectangle. Store it in two