Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7588609
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T19:57:54+00:00 2026-05-30T19:57:54+00:00

I am working on a project where I make traceroutes to a certain IP

  • 0

I am working on a project where I make traceroutes to a certain IP address from 10-15 different IP addresses. Most of the traceroutes go along certain common routers on the way(hop) to the same destination. The resulting data gives me a graph. I think to represent this data the best way is an adjacency list. Is there any C library where I can get an instance of such a graph and add edges(hops) to it as I make different traceroute calls?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T19:57:55+00:00Added an answer on May 30, 2026 at 7:57 pm
    #include <stdio.h>
    #include <stdlib.h>
    
    // adjacency list implementation of graph using linked list in c
    
    struct adj_node {
        int index;
        struct adj_node * next;
    };
    
    void makeadj(struct adj_node *nod,int adj) {
        struct adj_node *newadj=(struct adj_node *)malloc(sizeof(struct adj_node));
        newadj->index=adj;
        newadj->next=NULL;
        while(nod->next!=NULL)nod=nod->next;
        nod->next=newadj;
    }
    
    int main(){
        int i;
        struct adj_node graph[4],*temp;
        for(i=0;i<4;i++){
            graph[i].index=i;graph[i].next=NULL;
        }
        //example
        makeadj(&graph[0],2);
        makeadj(&graph[0],3);
        makeadj(&graph[1],2);
        makeadj(&graph[2],0);
        makeadj(&graph[2],1);
        makeadj(&graph[2],3);
        temp=&graph[2];
        while(temp->next!=NULL){
            printf("%d",temp->next->index);
            temp=temp->next;
        }
        return 0;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

What is the easy way to make war file? My project is working when
I am working on xcode project intended to make a universal app.With the window
So I'm working on a project where there are tasks that make up a
So I'm working on a project where there are tasks that make up a
I'm currently working on a java project that requires me to make a system
In my working folder of a VSS project, is it alright if I make
I'm working on my high-school matriculation asp.net project, and I wish to make a
I have been working on project, to make a website which read files(c/c++ text
I am working on a project where we make a VOIP phone call to
I am working on a project to make a database of the files I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.