c - 在 C 中查找特定单词

标签 c search

我正在尝试用 C 语言编写一个程序,其中我必须接受另一个 java 文件的输入并找到一个特定的单词,例如 class

我该怎么做?

最佳答案

. open the file as 'text' for reading
. while end-of-file not reached
.   read next line
.   parse/analyze line
.   if line contains "class"
.     here you got the specific word
. close the file

关于c - 在 C 中查找特定单词,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6995320/

相关文章:

c - 如果我在运行时有字符串中的变量名称,如何获取变量的地址?

c - 在 C 中传输隐藏数据

php - 搜索建议 - PHP - MySQL

regex - Netbeans - 查找不包含特定文本的文件

c - 为什么当我写任何其他数字时输出总是数字 1?

c - "Repassing"函数参数

c - 从两个数组中查找公共(public)值

java - 阵列标价

php - session ID 和搜索脚本

javascript - 如何为对象实现 glob ** ?