练习了下C标准库的函数

 #include<stdio.h>
  2 #include<string.h>
  3 #include<stdlib.h>
  4 #include <time.h>
  5 int main()
  6 {
  7 int c=5,d;
  8 char a[10]={"1abe"},b[8]={"1cdefg"};
  9 //strncpy(a,b,3*sizeof(char));//strncpy复制字符串,删除原字符串
 10 //strncat(a,b,2*sizeof(char));//strncat连接字符串
 11 //c=strncmp(a,b,1*sizeof(char));//比较字符串,相同返回0,不同同返回a(n)-b(n)
 12 //c=strspn(a,b);//返回包含相同字符串的首段长度
 13 //c=isspace(d);//判断是否为空格_换行符_水平制表符_垂直制表符
 14 //unsigned int seed=100;
 15 srand( (int)time(0) );//参数决定随机数的不同
 16 while(1)
 17 {
 18 c=rand()%150;//在0~150内波动
 19 //printf("1.%s ",a);
 20 //printf("2.%s",b);
 21 printf("%d ",c);
 22 for(d=0;d<500;d++)
 23 ;

/******************************/ /********好好学习-天天向上*****/ /******************************/
原文地址:https://www.cnblogs.com/langdexuming/p/4131048.html