⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tok1.c

📁 稀疏矩阵、链表、图、队列、二叉树、多叉树、排序、遗传算法等的实现
💻 C
字号:
#include <stdio.h>#include <string.h>voidtok(char *s, char *delim) {	char *tmp;	tmp = strtok(s, delim);	while (tmp) {		printf("token: %s\n", tmp);		tmp = strtok(NULL, delim);	}}intmain(void) {	/* never used a fixed size buffer like this in real code! */	char buf[1024];	/* to eat the newline */	char *nl;	while (fgets(buf, 1024, stdin)) {		/* I consider the != NULL superfluous, but some compilers		 * will give a warning without it.		 */		if ((nl = strchr(buf, '\n')) != NULL) {			/* no need for newline */			*nl = '\0';		}		tok(buf, " ");	}}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -