c-mohammad-sohrabi/graph_prj ? reverse-engineered prompt

Reverse engineered prompt

Build me a C app that lets me work with graphs from the command line.

I want to be able to enter a graph or a degree sequence, then choose different analyses like connectivity, cliques, independent sets, vertex covers, Euler paths, and line graphs. It should handle both directed and undirected graphs, and it would be great if it can also tell me things like strong, weak, and one sided connectivity for directed graphs.

Please make it interactive and easy to use, with clear prompts and readable output. If possible, generate DOT files and PNG images for the graphs too, but don’t fail if Graphviz is not installed. I also want it to build cleanly with CMake, and if you can include a Makefile that works on Linux or macOS that would be great.

Use standard C and keep memory handling safe, with good cleanup and error checking. If you need to look up current docs online for anything, go ahead.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab