Install cflow by entering the following commands in the terminal:
sudo apt update sudo apt install cflow
Analyze control flow in C source files
GNU cflow analyzes a collection of C source files and prints a graph, charting control flow within the program. . GNU cflow is able to produce both direct and inverted flowgraphs for C sources. Optionally a cross-reference listing can be generated. Two output formats are implemented: POSIX and GNU (extended). . Input files can optionally be preprocessed before analyzing.