# C Programming Code Examples

## C > Strings Code Examples

### C program to compare two strings

Finds Prime Number in C++ The Language -
In C++ coding, we take a 'For Loop' which will start from 1 up to number that has entered to check whether it is Prime Number or not with in for loop we set an 'IF' condition and placed

Program Implement a Stack by Linked List -
This Program implement a stack using linked list. A Stack is a type of queue that in practice is implemented as area of memory that holds all local variables and parameters used by any

C++ Code to List Files in Current Directory -
To list and "display/print" all the files present inside the current directory in The C++, use a pointer say dir of DIR and the pointer say pdir of dirent to open and "read directory" to print

C++ Program Finds the Area & Perimeter -
Enter width of rectangle and enter height of rectangle. Print the "area of rectangle". Print the perimeter of rectangle. Formula: Area of rectangle: height*width. Formula: Perimeter

Program Code Copy String by While Loop -
C program 'Copy one string to another' string using 'While loop'. Logic to copy one string to another string. Copy 'text1 to text2' character by character. Input a string from user, store it

Finds Independent Sets in Graph by Graph -
Code finds 'largest independent' set by graph coloring. In graph theory, an independent set or stable set is a set of vertices in a graph, no two of which are adjacent. That is, it is a set I

Converts Decimal to Hexadecimal Number -
C program input decimal number and convert to Hexadecimal number system. The Decimal number system is a base 10 number system. Decimal number system uses 10 symbols to...

Count Occurrence Positive Zero Negative -
We have to enter some set of numbers. Now to find occurrence of positive, negative, zero from the given set of numbers, just check all the numbers using for loop whether number