摘要: cx1.py参考代码: #encoding=utf-8 from random import * Passtr="0123456789abcdefghijklmnopqrstuvwxyz" def code(str): #生成6位密码 Pas="" for i in range(6): Pas += 阅读全文
posted @ 2022-06-17 20:54 好想成为一只鸟 阅读(39) 评论(0) 推荐(0)
摘要: #include<stdio.h> void print_c(); void print_c() { printf(" ####### \n"); printf("## ##\n"); printf("## \n"); printf("## \n"); printf("## \n"); printf 阅读全文
posted @ 2021-09-26 15:25 好想成为一只鸟 阅读(27) 评论(0) 推荐(0)
摘要: #include<stdio.h> int main() { const float pi=3.14; printf("%f\n",pi); pi=3.1415; return 0; } 常量不能被修改,否则会报错 指向常量的指针 #include<stdio.h> int main() { int 阅读全文
posted @ 2021-09-25 19:51 好想成为一只鸟 阅读(42) 评论(0) 推荐(0)
摘要: #include <stdio.h> int main () { int num=520; int *p=&num; int **pp=&p; printf("num:%d\n",num); printf("*p:%d\n",*p); printf("**p:%d\n",**pp); printf( 阅读全文
posted @ 2021-09-15 11:17 好想成为一只鸟 阅读(69) 评论(0) 推荐(0)
摘要: void是无类型的意思 void是通用指针, #include <stdio.h> int main () { int num=1024; int *pi=&num; char *ps="FishC"; void *pv; pv=pi; printf("pi:%p,pv:%p\n",pi,pv); 阅读全文
posted @ 2021-09-08 15:50 好想成为一只鸟 阅读(136) 评论(0) 推荐(0)
摘要: array[4][5]:指向包含五个元素的指针 #include <stdio.h> int main () { int array[4][5]={0}; printf("sizeof int:%d\n",sizeof(int)); printf("array:%p\n",array); print 阅读全文
posted @ 2021-09-08 15:50 好想成为一只鸟 阅读(50) 评论(0) 推荐(0)
摘要: 计算字符串里的字符个数,不要sizeof和strlen #include<stdio.h> int main() { char str[]="I love FishC.com!"; char *target=str; int count=0; while(*target++!='\0') { cou 阅读全文
posted @ 2021-09-01 15:14 好想成为一只鸟 阅读(43) 评论(0) 推荐(0)
摘要: #include<stdio.h> int main() { int a; int *p=&a; printf("请输入一个整数:"); scanf("%d",&a); printf("a=%d\n",a); printf("请再输入一个整数:"); scanf("%d",p); printf("a 阅读全文
posted @ 2021-09-01 11:40 好想成为一只鸟 阅读(48) 评论(0) 推荐(0)
摘要: 指针就是地址的意思 指针变量存放的是地址 普通变量存放的是数据 #include <stdio.h> int main() { char a='F'; int f=123; char *pa=&a; int *pb=&f; printf("a=%c\n",*pa); printf("f=%d\n", 阅读全文
posted @ 2021-08-22 11:25 好想成为一只鸟 阅读(40) 评论(0) 推荐(0)
摘要: #include <stdio.h> int main() { int a[3][4]={1,2,3,4,5,6,7,8,9,10,11,12,}; int i,j; for(i=0;i<3;i++) { for(j=0;j<4;j++) { printf("%d ",a[i][j]); } pri 阅读全文
posted @ 2021-08-22 10:30 好想成为一只鸟 阅读(51) 评论(0) 推荐(0)