C Program to find Connected Components in an Undirected Graph

By | June 7, 2017

Connected Components in an Undirected Graph


Write a C Program to find Connected Components in an Undirected Graph. Here’s simple Program to Cout the Number of Connected Components in an Undirected Graph in C Programming Language.


Undirected graph


An undirected graph is graph, i.e., a set of objects (called vertices or nodes) that are connected together, where all the edges are bidirectional. An undirected graph is sometimes called an undirected network. In contrast, a graph where the edges point in a direction is called a directed graph.


Also Read : : C Program to find whether an Undirected Graph is Connected or not

Below is the source code for C Program to find Connected Components in an Undirected Graph which is successfully compiled and run on Windows System to produce desired output as shown below :


SOURCE CODE : :



OUTPUT : :



If you found any error or any queries related to the above program or any questions or reviews , you wanna to ask from us ,you may Contact Us through our contact Page or you can also comment below in the comment section.We will try our best to reach up to you in short interval.


Thanks for reading the post…


Recommended Posts : :

Leave a Reply