2023年1月31日

strcmp函数

摘要: 原型:int strcmp(const char *s1, const char *s2); 头文件:#include <string.h> 功能:用来比较两个字符串 参数:s1、s2为两个进行比较的字符串 返回值:若s1、s2字符串相等,则返回零;若s1大于s2,则返回大于零的数;否则,则返回小于 阅读全文

posted @ 2023-01-31 16:21 messing 阅读(179) 评论(0) 推荐(0)

冒泡排序

摘要: 1 // 冒泡排序<参考代码> 2 void BubbleSort(int arr[], int length) 3 { 4 for (int i = 0; i < length; i++) 5 { 6 for (int j = 0; j < length - i - 1; j++) 7 { 8 i 阅读全文

posted @ 2023-01-31 16:19 messing 阅读(23) 评论(0) 推荐(0)

导航