C program to check whether a given 5 digit number is palindrome or not

Check for Palindromic number. C program to check whether a given 5 digit number is palindrome or not.

Problem Statement

Write a C program to check if a given 5 digit number is palindrome or not. Take input from the user, check if the given number is a palindromic number and display appropriate message in the end.

A number is said to be a palindromic number if it remains same when reversed. For example 12321 is a palindromic number, where as 12345 is not. You can read more about Palindromic number.

Solution

The program takes input number from the user. Then the digits of the given number are reversed. Reversed number is compared with the original number to check if they are equal. If they are equal, the original number is a palindrome. If they are not equal, then the number is not a palindrome.

The Program

[gist id=”7150315″]

Sample Output

Palindrome number or not

Related Programs

  1. C program to check whether a given string is palindrome or not
  2. Number System

To get regular updates on new C programs, you can Follow @c_program

Like to get updates right inside your feed reader? Grab our feed!

(c) www.c-program-example.com

C program to convert a Binary number into its equivalent Decimal, Octal and Hexadecimal numbers.

C Program to convert binary number into its equivalent Decimal, Octal, and Hexadecimal representations. In this program we convert a binary number to decimal. Then convert that decimal number to octal and Hexadecimal equivalent.

The program implements various functions to do the job.

  • binary_to_decimal : Convert given binary number to it’s decimal equivalent
  • decimal_to_octal : Convert from decimal to octal
  • decimal_to_hex : Convert from decimal to hexadecimal

The main function takes care of getting input from user, calling the above functions and displaying the results.

Read more here: What are binary, octal, and hexadecimal notation?

The Program

[gist id = “d13c5fbfc46250b75871fb384db19e18”]

Sample Output

Binary to decimal, binary to octal, binary to hexadecimal

Related Programs

You can discuss these programs on our Facebook Page. Like to get updates right inside your feed reader? Grab our feed!

Edit1 : 11th August 2017

  • Added screenshot of sample runs
  • Moved the code to it’s own Gist
  • Modified the program to make it more modular

(c) www.c-program-example.com

C program to create a subsets using backtracking method.

C Program to find the subsets in the set. We use the backtracking method to solve this problem. Backtracking is the refinement method of Brute-Force method. Backtrack method means it finds the number of sub solutions and each may have number of sub divisions, and solution chosen for exactly one. Backtracking method is a recursive method. Read more about C Programming Language .

/***********************************************************
* You can use all the programs on www.c-program-example.com
* for personal and learning purposes. For permissions to use the
* programs for commercial purposes,
* contact [email protected]
* To find more C programs, do visit www.c-program-example.com
* and browse!
*
* Happy Coding
***********************************************************/

#include<stdio.h>
#include<conio.h>
#define TRUE 1
#define FALSE 0
int inc[50],w[50],sum,n;
int promising(int i,int wt,int total)
{
return(((wt+total)>=sum)&&((wt==sum)||(wt+w[i+1]<=sum)));
}
/*
* You can find this program on GitHub
* https://github.com/snadahalli/cprograms/blob/master/subsets.c
*/
void main()
{
int i,j,n,temp,total=0;
clrscr();
printf("n Enter how many numbers:n");
scanf("%d",&n);
printf("n Enter %d numbers to th set:n",n);
for(i=0;i<n;i++)
{
scanf("%d",&w[i]);
total+=w[i];
}
printf("n Input the sum value to create sub set:n");
scanf("%d",&sum);
for(i=0;i<=n;i++)
for(j=0;j<n-1;j++)
if(w[j]>w[j+1])
{
temp=w[j];
w[j]=w[j+1];
w[j+1]=temp;
}
printf("n The given %d numbers in ascending order:n",n);
for(i=0;i<n;i++)
printf("%d t",w[i]);
if((total<sum))
printf("n Subset construction is not possible");
else
{
for(i=0;i<n;i++)
inc[i]=0;
printf("n The solution using backtracking is:n");
sumset(-1,0,total);
}
getch();
}
void sumset(int i,int wt,int total)
{
int j;
if(promising(i,wt,total))
{
if(wt==sum)
{
printf("n{t");
for(j=0;j<=i;j++)
if(inc[j])
printf("%dt",w[j]);
printf("}n");
}
else
{
inc[i+1]=TRUE;
sumset(i+1,wt+w[i+1],total-w[i+1]);
inc[i+1]=FALSE;
sumset(i+1,wt,total-w[i+1]);
}
}
}
Read more Similar C Programs
Learn C Programming

Number System

You can easily select the code by double clicking on the code area above.

To get regular updates on new C programs, you can Follow @c_program

You can discuss these programs on our Facebook Page. Start a discussion right now,

our page!

Share this program with your Facebook friends now! by liking it

(you can send this program to your friend using this button)

Like to get updates right inside your feed reader? Grab our feed!

–>

(c) www.c-program-example.com

DFS Program in C – Depth First Search with Example

Depth First Search (DFS) is a graph traversal algorithm that explores as far as possible along each branch before backtracking. Starting from a source node, it follows one path all the way to a dead end, then backtracks and tries the next unvisited neighbor. DFS uses a stack — either an explicit one or the program’s call stack via recursion.

DFS is the foundation for topological sorting, cycle detection, maze solving, and finding strongly connected components in a graph.

How DFS Works — Step by Step

The algorithm maintains a visited[] array to avoid revisiting nodes.

  1. Start at the source node. Mark it visited.
  2. Pick any unvisited neighbor. Recurse into it (go deep).
  3. When no unvisited neighbors remain, backtrack to the previous node.
  4. Repeat until all reachable nodes are visited.

Example: Graph with 4 nodes — 1 connects to 2 and 3, node 2 connects to 4.

Adjacency Matrix:
    1  2  3  4
1 [ 0  1  1  0 ]
2 [ 1  0  0  1 ]
3 [ 1  0  0  0 ]
4 [ 0  1  0  0 ]

DFS from node 1:
  Visit 1 → go to first neighbor: 2
  Visit 2 → go to first unvisited neighbor: 4
  Visit 4 → no unvisited neighbors → backtrack to 2
  Backtrack to 1 → next unvisited neighbor: 3
  Visit 3 → no unvisited neighbors → backtrack

Traversal order: 1 → 2 → 4 → 3
Edges traversed: 1→2, 2→4, 1→3

Notice DFS goes deep (1→2→4) before trying 3, while BFS would have visited 2 and 3 before going to 4.

C Program for DFS (Depth First Search)

#include <stdio.h>

int a[20][20], reach[20], n;

void dfs(int v) {
    int i;
    reach[v] = 1;
    for (i = 1; i <= n; i++) {
        if (a[v][i] && !reach[i]) {
            printf("%d -> %d\n", v, i);
            dfs(i);
        }
    }
}

int main() {
    int i, j, count = 0;

    printf("Enter number of vertices: ");
    scanf("%d", &n);

    for (i = 1; i <= n; i++) {
        reach[i] = 0;
        for (j = 1; j <= n; j++)
            a[i][j] = 0;
    }

    printf("Enter the adjacency matrix (%d x %d):\n", n, n);
    for (i = 1; i <= n; i++)
        for (j = 1; j <= n; j++)
            scanf("%d", &a[i][j]);

    printf("\nDFS traversal edges:\n");
    dfs(1);

    for (i = 1; i <= n; i++)
        if (reach[i])
            count++;

    printf("\nVisited %d of %d nodes.\n", count, n);
    if (count == n)
        printf("Graph is connected.\n");
    else
        printf("Graph is NOT connected — %d nodes unreachable from vertex 1.\n", n - count);

    return 0;
}

Code Explanation

  • Global arrays a[][] and reach[]: The adjacency matrix stores the graph; reach[i] = 1 once node i is visited.
  • Recursive dfs(v): Marks v visited, then iterates through all possible neighbors. For each unvisited neighbor, it prints the edge and recurses. The recursion naturally uses the call stack as DFS’s implicit stack.
  • Connectivity check: After DFS completes from vertex 1, any node with reach[i] == 0 was unreachable — meaning the graph has disconnected components.
  • 1-indexed arrays: The program uses 1-based indexing (loops from 1 to n) to match the natural way vertices are numbered in most textbook problems.

Sample Input and Output

Enter number of vertices: 4
Enter the adjacency matrix (4 x 4):
0 1 1 0
1 0 0 1
1 0 0 0
0 1 0 0

DFS traversal edges:
1 -> 2
2 -> 4
1 -> 3

Visited 4 of 4 nodes.
Graph is connected.

Time and Space Complexity

Representation Time Complexity Space Complexity
Adjacency Matrix O(V²) O(V)
Adjacency List O(V + E) O(V)

Where V = vertices and E = edges. This program uses an adjacency matrix, so it scans all V nodes for each vertex visited — giving O(V²). Space is O(V) for the visited array plus O(V) recursion stack depth in the worst case (a linear graph).

DFS vs BFS — When to Use Which

Property DFS BFS
Data structure Stack (recursion) Queue
Traversal style Go deep first Level by level
Memory usage Lower — O(depth) Higher — O(width)
Shortest path No Yes (unweighted)
Finds all paths Yes No (finds shortest only)
Best for Topological sort, cycles, mazes Shortest path, peer networks

Memory advantage of DFS: DFS only needs to remember the current path from root to the active node. BFS must store all nodes at the current level, which can be enormous in a wide graph. For deep, narrow graphs (like a maze), DFS is significantly more memory-efficient.

Applications of DFS

  • Topological sorting: Ordering tasks with dependencies (build systems, course prerequisites). DFS post-order gives a valid topological order.
  • Cycle detection: If DFS visits a node already on the current path, there is a cycle. Used in deadlock detection in operating systems.
  • Maze solving: DFS naturally explores one path to its end before trying another — the same strategy humans use to navigate a maze.
  • Strongly Connected Components: Kosaraju’s and Tarjan’s algorithms for SCCs both use DFS as their core.
  • Web crawlers: Some crawlers use DFS to follow links deep into a site before backtracking.

Related Programs


As an Amazon Associate we earn from qualifying purchases.

Further Reading

The definitive reference for C — The C Programming Language by Brian Kernighan and Dennis Ritchie. Covers every concept on this site: pointers, arrays, structs, file I/O, and the standard library. Worth having on your desk.

BFS Program in C – Breadth First Search with Example

Breadth First Search (BFS) is a graph traversal algorithm that visits every node in a graph level by level — starting from a source node, it explores all immediate neighbors first, then their neighbors, and so on. Because of this level-by-level behavior, BFS always finds the shortest path between two nodes in an unweighted graph.

BFS is used in real-world applications like social network friend suggestions (finding people within N degrees of connection), GPS navigation (shortest route), and network broadcasting.

How BFS Works — Step by Step

BFS uses a queue (First In, First Out) to track which node to visit next.

  1. Start at the source node. Mark it as visited and add it to the queue.
  2. Dequeue the front node. For each of its unvisited neighbors, mark them visited and enqueue them.
  3. Repeat step 2 until the queue is empty.

Example: Consider a graph with 4 nodes where node 1 connects to 2 and 3, and node 2 connects to 4.

Adjacency Matrix:
    1  2  3  4
1 [ 0  1  1  0 ]
2 [ 1  0  0  1 ]
3 [ 1  0  0  0 ]
4 [ 0  1  0  0 ]

BFS from node 1:
Step 1: Visit 1, queue = [2, 3]
Step 2: Visit 2, queue = [3, 4]
Step 3: Visit 3, queue = [4]
Step 4: Visit 4, queue = []

Traversal order: 1 → 2 → 3 → 4

C Program for BFS (Breadth First Search)

The program below uses an adjacency matrix to represent the graph. A value of 1 at position [i][j] means there is an edge from node i to node j.

#include <stdio.h>

int a[20][20], q[20], visited[20], n, i, j, f = 0, r = -1;

void bfs(int v) {
    for (i = 1; i <= n; i++)
        if (a[v][i] && !visited[i]) {
            q[++r] = i;
            visited[i] = 1;
        }
    if (f <= r)
        bfs(q[f++]);
}

int main() {
    int v;
    printf("Enter the number of vertices: ");
    scanf("%d", &n);

    for (i = 1; i <= n; i++) {
        q[i] = 0;
        visited[i] = 0;
    }

    printf("Enter the adjacency matrix (%d x %d):\n", n, n);
    for (i = 1; i <= n; i++)
        for (j = 1; j <= n; j++)
            scanf("%d", &a[i][j]);

    printf("Enter the starting vertex: ");
    scanf("%d", &v);

    visited[v] = 1;
    bfs(v);

    printf("Visited nodes: ");
    for (i = 1; i <= n; i++)
        if (visited[i])
            printf("%d ", i);

    printf("\n");
    return 0;
}

Code Explanation

  • Adjacency matrix a[20][20]: Stores the graph. a[i][j] = 1 means an edge exists between node i and node j.
  • Queue q[] with front f and rear r: Nodes waiting to be processed. f points to the front (next to dequeue), r to the rear (last enqueued).
  • visited[] array: Prevents revisiting nodes. A node is marked visited when enqueued, not when processed — this avoids adding duplicates to the queue.
  • Recursive bfs(v): Enqueues all unvisited neighbors of v, then recurses on the next node in the queue. This mimics the iterative dequeue-process loop.

Sample Input and Output

Enter the number of vertices: 4
Enter the adjacency matrix (4 x 4):
0 1 1 0
1 0 0 1
1 0 0 0
0 1 0 0
Enter the starting vertex: 1

Visited nodes: 1 2 3 4

All 4 nodes are reachable from vertex 1, so BFS visits all of them in level order.

Time and Space Complexity

Case Time Complexity Space Complexity
Adjacency Matrix O(V²) O(V)
Adjacency List O(V + E) O(V)

Where V = number of vertices and E = number of edges. This program uses an adjacency matrix, so the time complexity is O(V²). For sparse graphs (few edges), an adjacency list implementation gives better performance at O(V + E).

Space complexity is O(V) for the queue and visited array.

BFS vs DFS — Key Differences

Property BFS DFS
Data structure Queue (FIFO) Stack (LIFO) or recursion
Traversal order Level by level As deep as possible first
Shortest path Yes (unweighted graphs) No
Memory usage Higher (stores all neighbors) Lower (stores one path)
Best for Shortest path, peer networks Topological sort, cycle detection

Applications of BFS

  • Shortest path in unweighted graphs — GPS routing on maps with equal-cost roads
  • Social networks — finding people within N degrees of connection (LinkedIn, Facebook)
  • Web crawlers — crawling links level by level from a seed URL
  • Network broadcasting — sending packets to all nodes in a network
  • Puzzle solving — finding minimum moves in sliding puzzles, Rubik’s cube

Related Programs


As an Amazon Associate we earn from qualifying purchases.

Further Reading

The definitive reference for C — The C Programming Language by Brian Kernighan and Dennis Ritchie. Covers every concept on this site: pointers, arrays, structs, file I/O, and the standard library. Worth having on your desk.

C Program to find the Inverse of the Matrix.

C Program to find the Inverse of a Matrix. To find the Matrix Inverse, matrix should be a square matrix and Matrix Determinant is should not Equal to Zero. if A is a Square matrix and |A|!=0, then AA’=I (I Means Identity Matrix). Read more about C Programming Language .

/***********************************************************
* You can use all the programs on www.c-program-example.com
* for personal and learning purposes. For permissions to use the
* programs for commercial purposes,
* contact [email protected]
* To find more C programs, do visit www.c-program-example.com
* and browse!
*
* Happy Coding
***********************************************************/

#include<stdio.h>
#include<math.h>
float detrminant(float[][], float);
void cofactors(float[][], float);
void trans(float[][], float[][], float);
main() {
float a[25][25], n, d;
int i, j;
printf("Enter the order of the matrix:n");
scanf("%f", &n);
printf("Enter the elemnts into the matrix:n");
for (i = 0; i < n; i++) {
for (j = 0; j < n; j++) {
scanf("%f", &a[i][j]);
}
}
d = detrminant(a, n);
printf("nTHE DETERMINANT IS=%2f", d);
if (d == 0)
printf("nMATRIX IS NOT INVERSIBLEn");
else
cofactors(a, n);
}

float detrminant(float a[25][25], float k) {
float s = 1, det = 0, b[25][25];
int i, j, m, n, c;
if (k == 1) {
return (a[0][0]);
} else {
det = 0;
for (c = 0; c < k; c++) {
m = 0;
n = 0;
for (i = 0; i < k; i++) {
for (j = 0; j < k; j++) {
b[i][j] = 0;
if (i != 0 && j != c) {
b[m][n] = a[i][j];
if (n < (k - 2))
n++;
else {
n = 0;
m++;
}
}
}
}
det = det + s * (a[0][c] * detrminant(b, k - 1));
s = -1 * s;
}
}
return (det);
}

void cofactors(float num[25][25], float f) {
float b[25][25], fac[25][25];
int p, q, m, n, i, j;
for (q = 0; q < f; q++) {
for (p = 0; p < f; p++) {
m = 0;
n = 0;
for (i = 0; i < f; i++) {
for (j = 0; j < f; j++) {
b[i][j] = 0;
if (i != q && j != p) {
b[m][n] = num[i][j];
if (n < (f - 2))
n++;
else {
n = 0;
m++;
}
}
}
}
fac[q][p] = pow(-1, q + p) * detrminant(b, f - 1);
}
}
trans(num, fac, f);
}

void trans(float num[25][25], float fac[25][25], float r)

{
int i, j;
float b[25][25], inv[25][25], d;
for (i = 0; i < r; i++) {
for (j = 0; j < r; j++) {
b[i][j] = fac[j][i];
}
}

d = detrminant(num, r);
inv[i][j] = 0;
for (i = 0; i < r; i++) {
for (j = 0; j < r; j++) {
inv[i][j] = b[i][j] / d;
}
}

printf("nTHE INVERSE OF THE MATRIX:n");
for (i = 0; i < r; i++) {
for (j = 0; j < r; j++) {
printf("t%2f", inv[i][j]);
}
printf("n");
}
}
Read more Similar C Programs
Matrix Programs
Learn C Programming

You can easily select the code by double clicking on the code area above.

To get regular updates on new C programs, you can Follow @c_program

You can discuss these programs on our Facebook Page. Start a discussion right now,

our page!

Share this program with your Facebook friends now! by liking it

(you can send this program to your friend using this button)

Like to get updates right inside your feed reader? Grab our feed!

(c) www.c-program-example.com

C Program to implement Dijkstra’s algorithm.

C Program to implement Dijkstra’s algorithm. Dijkstra’s Algorithm finds the shortest path with the lower cost in a Graph. Dijkstra’s Algorithm solves the Single Source Shortest Path problem for a Graph. It is a Greedy algorithm and similar to Prim’s algorithm. Read more about C Programming Language .


/***********************************************************
* You can use all the programs on www.c-program-example.com
* for personal and learning purposes. For permissions to use the
* programs for commercial purposes,
* contact [email protected]
* To find more C programs, do visit www.c-program-example.com
* and browse!
*
* Happy Coding
***********************************************************/

#include "stdio.h"
#include "conio.h"
#define infinity 999

void dij(int n,int v,int cost[10][10],int dist[])
{
int i,u,count,w,flag[10],min;
for(i=1;i<=n;i++)
flag[i]=0,dist[i]=cost[v][i];
count=2;
while(count<=n)
{
min=99;
for(w=1;w<=n;w++)
if(dist[w]<min && !flag[w])
min=dist[w],u=w;
flag[u]=1;
count++;
for(w=1;w<=n;w++)
if((dist[u]+cost[u][w]<dist[w]) && !flag[w])
dist[w]=dist[u]+cost[u][w];
}
}

void main()
{
int n,v,i,j,cost[10][10],dist[10];
clrscr();
printf("n Enter the number of nodes:");
scanf("%d",&n);
printf("n Enter the cost matrix:n");
for(i=1;i<=n;i++)
for(j=1;j<=n;j++)
{
scanf("%d",&cost[i][j]);
if(cost[i][j]==0)
cost[i][j]=infinity;
}
printf("n Enter the source matrix:");
scanf("%d",&v);
dij(n,v,cost,dist);
printf("n Shortest path:n");
for(i=1;i<=n;i++)
if(i!=v)
printf("%d->%d,cost=%dn",v,i,dist[i]);
getch();
}
Read more Similar C Programs
Data Structures
Prims Algorithm

Learn C Programming

You can easily select the code by double clicking on the code area above.
To get regular updates on new C programs, you can Follow @c_program

You can discuss these programs on our Facebook Page. Start a discussion right now,

our page!

Share this program with your Facebook friends now! by liking it

(you can send this program to your friend using this button)

Like to get updates right inside your feed reader? Grab our feed!

(c) www.c-program-example.com

C Program to solve Knapsack problem

C Program to solve Knapsack problem. Knapsack problem is also called as rucksack problem. In Knapsack problem, given a set items with values and weights and a limited weight bag . We have to find the optimum solution so that, in minimum cost(value) fill the bag with the maximum weight. Read more about C Programming Language .

/***********************************************************
* You can use all the programs on www.c-program-example.com
* for personal and learning purposes. For permissions to use the
* programs for commercial purposes,
* contact [email protected]
* To find more C programs, do visit www.c-program-example.com
* and browse!
*
* Happy Coding
***********************************************************/

#include<stdio.h>
#include<conio.h>
int w[10],p[10],v[10][10],n,i,j,cap,x[10]={0};
int max(int i,int j)
{
return ((i>j)?i:j);
}
int knap(int i,int j)
{
int value;
if(v[i][j]<0)
{
if(j<w[i])
value=knap(i-1,j);
else
value=max(knap(i-1,j),p[i]+knap(i-1,j-w[i]));
v[i][j]=value;
}
return(v[i][j]);
}
void main()
{
int profit,count=0;
clrscr();
printf("nEnter the number of elementsn");
scanf("%d",&n);
printf("Enter the profit and weights of the elementsn");
for(i=1;i<=n;i++)
{
printf("For item no %dn",i);
scanf("%d%d",&p[i],&w[i]);
}
printf("nEnter the capacity n");
scanf("%d",&cap);
for(i=0;i<=n;i++)
for(j=0;j<=cap;j++)
if((i==0)||(j==0))
v[i][j]=0;
else
v[i][j]=-1;
profit=knap(n,cap);
i=n;
j=cap;
while(j!=0&&i!=0)
{
if(v[i][j]!=v[i-1][j])
{
x[i]=1;
j=j-w[i];
i--;
}
else
i--;
}
printf("Items included aren");
printf("Sl.notweighttprofitn");
for(i=1;i<=n;i++)
if(x[i])
printf("%dt%dt%dn",++count,w[i],p[i]);
printf("Total profit = %dn",profit);
getch();
}
Read more Similar C Programs
Data Structures

Learn C Programming

You can easily select the code by double clicking on the code area above.

To get regular updates on new C programs, you can Follow @c_program

You can discuss these programs on our Facebook Page. Start a discussion right now,

our page!

Share this program with your Facebook friends now! by liking it

(you can send this program to your friend using this button)

Like to get updates right inside your feed reader? Grab our feed!

(c) www.c-program-example.com

Binary To Decimal in C

C Program to convert a binary number into its equivalent Decimal. In binary number system or base-2 system numeric valuer are represented by using two different symbols 0 and 1. The binary number system is a positional notation with a radix of 2.

Read more here: What are binary, octal, and hexadecimal notation?

This program converts a given base-2 number to it’s decimal equivalent (or base-10 representation).

The Program

[gist id=”d67b0d3858c5c4238e39292e8b970b91″]

Sample Output

Binary To Decimal

 

Related Programs

Edit1: 21st August 2017

  • Added links to related programs
  • Added a screenshot of sample output
  • Moved program to it’s own gist.

 

To get regular updates on new C programs, you can Follow @c_program.

You can discuss these programs on our Facebook Page.

Like to get updates right inside your feed reader? Grab our feed!

(c) www.c-program-example.com

C Program to count number of characters in the file

C Program to count number of characters in the file. In this program you can learn c file operations. Here we counting the characters by reading the characters in the file one by one and if read character was not an ‘n’ ,’t’ or EOF, it increments the counter by one. Read more about C Programming Language .

/***********************************************************
* You can use all the programs on www.c-program-example.com
* for personal and learning purposes. For permissions to use the
* programs for commercial purposes,
* contact [email protected]
* To find more C programs, do visit www.c-program-example.com
* and browse!
*
* Happy Coding
***********************************************************/

#include<stdio.h>
#include<conio.h>

void main()
{
char ch;
int count=0;
FILE *fptr;
clrscr();
fptr=fopen("text.txt","w");
if(fptr==NULL)
{
printf("File can't be createda");
getch();
exit(0);
}
printf("Enter some text and press enter key:n");
while((ch=getche())!='r')
{
fputc(ch,fptr);
}
fclose(fptr);
fptr=fopen("text.txt","r");
printf("nContents of the File is:");
while((ch=fgetc(fptr))!=EOF)
{
count++;
printf("%c",ch);
}
fclose(fptr);
printf("nThe number of characters present in file is: %d",count);
getch();
}

Read more Similar C Programs
C Basic

C Strings

You can easily select the code by double clicking on the code area above.

To get regular updates on new C programs, you can Follow @c_program

You can discuss these programs on our Facebook Page. Start a discussion right now,

our page!

Share this program with your Facebook friends now! by liking it

(you can send this program to your friend using this button)

Like to get updates right inside your feed reader? Grab our feed!

(c) www.c-program-example.com