The Web forum is the popular platform used for C++ program learning in which learners can discuss and solve the encountered problems collaboratively. The process of discussions for specific topics in the forum is most likely the inquiry-based learning. Discovering the students' inquiry behavior models in the forum is helpful for teachers to support the guidance during the inquiry-based learning. In this paper, the clustering analysis is applied to discover the behavior patterns on the forum. Before the clustering, we first apply the divide and conquer mining strategy to classify the documents into purposes and sub-purposes until the number of documents is affordable for clustering analysis. To incrementally maintain the topics of inquiry behavior and efficiently analyze the new inquiry topic, the self-organizing ontology maintenance scheme is proposed. The topics discussed with multiple purposes are identified as inquiry behavior of hot topics. Finally, the experiment of inquiry behavior mining from legacy forums has been evaluated and the experimental result shows the usefulness of the obtained behavior information.