- 博客(2)
- 收藏
- 关注
原创 c语言strcmp函数应用示例
用c语言的strcmp函数实现最简单的登录界面这是源代码#include <stdio.h>#include <stdlib.h>#include <string.h>#include <math.h>#include <time.h>int login(char *a,char *b) //登录函数{ char ch[] ="1234567890"; char ch1[] = "123456"; int j = strcm
2021-01-13 08:45:01
695
原创 C语言中的一些重要函数
1.字符串复制函数 —— strcpy strcpny头文件:#include <string.h>用法:strcpy(字符串1,字符串2);strcpny(字符串1,字符串2,n);作用: 将字符串2复制到字符串1中函数原型:char *strcpy(char *dest,const char *src);char *strcpny(char *dest,constchar *src,size_t n);2.字符串比较函数 —— strcmp用法:strcmp(字符串1
2021-01-12 08:19:44
575
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人