摘要: 要求:将 +-*/ 四个运算符,填写到 5 5 5 5 5 = 5,使得等式成立 由于C语言中,没有 python.eval 这样的内置函数,必须自己实现字符串到计算公式的转换。 #include <stdio.h>#include <stdlib.h>#include <conio.h>int m 阅读全文
posted @ 2021-12-17 16:35 雅丽梅 阅读(61) 评论(0) 推荐(0)
摘要: // 一、常用的文件操作函数#define MAX 50void main() { int num, i, array[MAX]; FILE *fp; long offset; for (i = 0; i < MAX; i++) { array[i] = i+10; } if ((fp = fope 阅读全文
posted @ 2021-12-17 16:21 雅丽梅 阅读(34) 评论(0) 推荐(0)
摘要: 一、正负数的表示: 计算机只能存储01,正负数的存储有别!以最高位作为符号位:0=正数,1=负数! 正数的原码==反码==补码: EG:10 =》 0000 1010 负数的原码,即将其正数表示的符号位,改为1: EG:-10 =》 1000 1010 负数的反码,即其原码的符号位不变,其他位取反: 阅读全文
posted @ 2021-12-14 21:21 雅丽梅 阅读(224) 评论(0) 推荐(0)
摘要: // 三、判断一个链表是否存在环/* 两个指针:slow.step=1, fast.step=2,在环中两个指针必定相遇 */typedef struct node { int elem; struct node *next;}Node, *NodeList; bool IsExitsLoop(No 阅读全文
posted @ 2021-12-14 14:50 雅丽梅 阅读(46) 评论(0) 推荐(0)
摘要: 原文引用:https://blog.csdn.net/qq_42366014/article/details/105000993 #include <stdio.h>#include <stdlib.h>#include <stdbool.h> typedef struct mylist { int 阅读全文
posted @ 2021-12-10 19:45 雅丽梅 阅读(36) 评论(0) 推荐(0)
摘要: /* 1. 指向同一数组的两个指针的差 == 相隔的元素个数,不是字节数int main(void) { int i, t, *p, *q, a[10] = { 1,3,5,7,9,11,13,15,17,19 }; for (p = a, i = 0; i < 10; i++) { printf( 阅读全文
posted @ 2021-12-08 14:11 雅丽梅 阅读(40) 评论(0) 推荐(0)
摘要: /* 1. 求一段字符串中的最长单词 int LTH = 0;int length=0;char result[100]; // 如果放在函数longest中,函数调用完毕,会将其释放int alpha(char c) { if ((c >= 'a' && c <= 'z') || (c >= 'A 阅读全文
posted @ 2021-12-03 14:08 雅丽梅 阅读(11) 评论(0) 推荐(0)
摘要: /* 求两个自然数的最大公约数和最小公倍数int hcd(int u, int v) { int a, b, tmp, result; if (u > v) { tmp = u; u = v; v = tmp; } a = u; b = v; while ((result=b%a) != 0) { 阅读全文
posted @ 2021-12-01 19:17 雅丽梅 阅读(72) 评论(0) 推荐(0)
摘要: /* 结构化程序设计的基本结构:顺序、选择、循环int main(){ int num=100; float f = 3.13145; //printf 格式化输出 printf("num= %-d\n",num); //num= 100 左对齐 printf("num= %+d\n",num); 阅读全文
posted @ 2021-12-01 14:40 雅丽梅 阅读(98) 评论(0) 推荐(0)
摘要: 一、首先创建AWS ELC时,启用TLS,Terraform Code resource "aws_elasticache_replication_group" “test”{ transit_encryption_enabled = true } 二、编译redis-cli,env = Ubunt 阅读全文
posted @ 2021-08-20 17:11 雅丽梅 阅读(858) 评论(0) 推荐(0)