?? find.c
字號(hào):
#include <stdio.h>
#include <string.h>
main()
{
char text[1000], *list = text;
char find[300];
int n;
printf("請(qǐng)輸入一段文字:\n");
scanf("%s", text);
printf("請(qǐng)輸入你要查找的文字:\n");
scanf("%s", find);
n = strlen(find);
while (*list)
if (!strncmp(list++, find, n))
printf("搜索到的文字如下:\n%s\n", list - 1);
return 0;
}
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -