<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[C语言学习笔记]]></title><description><![CDATA[持续更新中...]]></description><link>https://blog.youkuaiyun.com/m0_64729607</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; m0_64729607]]></copyright><item><title><![CDATA[【Python】函数相关]]></title><link>https://blog.youkuaiyun.com/m0_64729607/article/details/124465427</link><guid>https://blog.youkuaiyun.com/m0_64729607/article/details/124465427</guid><author>m0_64729607</author><pubDate>Thu, 28 Apr 2022 09:28:30 +0800</pubDate><description><![CDATA[当调用函数时,如果没有为某些形参传递对应的实参,则这些形参会自动使用默认参数值；

在使用关键字参数调用函数时,实参的传递顺序与形参列表中形参的顺序可以不一致；

当普通实参传递给形参后,如果在函数体中对形参值做修改,则该修改并不会影响实参,即实参值不会改变；

如果实参是列表等对象时,可在函数体中通过形参修改实参列表中对应元素的值。

列表、元组拆分出来的结果作为位置参数,字典拆分出来的结果作为关键字参数；



#s声明全局变量 n虽然同名但代表不同的变量，是局部变量


s=0
n=0
def fu.]]></description><category></category></item><item><title><![CDATA[【Python】字典相关]]></title><link>https://blog.youkuaiyun.com/m0_64729607/article/details/124239011</link><guid>https://blog.youkuaiyun.com/m0_64729607/article/details/124239011</guid><author>m0_64729607</author><pubDate>Mon, 18 Apr 2022 08:23:53 +0800</pubDate><description><![CDATA[1.可以使用{}或dict()创建空字典，但若要创建空集合只能用set函数

2.将列表生成表达式中的一对中括号改为一对小括号即可得到生成器

对于生成器对象,也可以像其他可迭代对象一样使用for循环遍历对象中的每一个元素

如果生成元素的方法比较复杂,不适合用for循环方式实现,我们还可以借助yield关键字利用函数实现生成器的功能

生成器是一个迭代器，元素用时才生成

3.列表是可迭代对象、但不是迭代器，需用iter函数转化为迭代器；而生成器既是可迭代对象、又是迭代器

4.dict3 = {[4,5]]></description><category></category></item><item><title><![CDATA[【Python】列表相关运用]]></title><link>https://blog.youkuaiyun.com/m0_64729607/article/details/123568451</link><guid>https://blog.youkuaiyun.com/m0_64729607/article/details/123568451</guid><author>m0_64729607</author><pubDate>Fri, 18 Mar 2022 23:35:31 +0800</pubDate><description><![CDATA[Python中，组合数据类型：序列（字符串、列表、元组）、字典、集合
]]></description><category></category></item><item><title><![CDATA[【Python】格式化输出、猜随机数、ASCII码加密、加减乘除测试题]]></title><link>https://blog.youkuaiyun.com/m0_64729607/article/details/123565424</link><guid>https://blog.youkuaiyun.com/m0_64729607/article/details/123565424</guid><author>m0_64729607</author><pubDate>Fri, 18 Mar 2022 10:15:48 +0800</pubDate><description><![CDATA[# 格式化输出常用方式


length,weight = 159,50
print("length:%d cm,weight:%f kg"%(length,weight))
import math
print("{0:&gt;+10.2f}".format(math.pi))#      +3.14
print(f"pi is {math.pi:&gt;+10.2f}")# pi is      +3.14







#随机数猜大小


import random
key = random.r...]]></description><category></category></item><item><title><![CDATA[【Keil5】LED与蜂鸣器异步完成《春节序曲》、按键控制LCD显示时钟//普中STC89C5xx-RC Series]]></title><link>https://blog.youkuaiyun.com/m0_64729607/article/details/122740090</link><guid>https://blog.youkuaiyun.com/m0_64729607/article/details/122740090</guid><author>m0_64729607</author><pubDate>Sat, 29 Jan 2022 22:19:54 +0800</pubDate><description><![CDATA[LED与蜂鸣器异步完成《春节序曲》//附源码
8*8LED屏流水显示happy new year
主函数内调用蜂鸣器频率头文件]]></description><category></category></item><item><title><![CDATA[【Keil5】定时器应用//普中STC89C5xx-RC Series]]></title><link>https://blog.youkuaiyun.com/m0_64729607/article/details/122650269</link><guid>https://blog.youkuaiyun.com/m0_64729607/article/details/122650269</guid><author>m0_64729607</author><pubDate>Sun, 23 Jan 2022 22:18:39 +0800</pubDate><description><![CDATA[#include &lt;REGX52.H&gt;
#include "DSQ.h"

void main()
{
	DSQ_init();//定时器初始化
	while(1)
	{//初始化后，程序一直停在while，定时器若响应，执行routine语句
	}
}
void Timer0_Routine() interrupt 1
{
	static int num=0;
	TL0=0X18;//重设计数，数1000，约1毫秒
	TH0=0XFC;
	num++;
	if(num&gt;=1000)//.]]></description><category></category></item><item><title><![CDATA[【Keil5】按键控制数码管、矩阵键盘LCD密码锁//普中STC89C5xx-RC Series]]></title><link>https://blog.youkuaiyun.com/m0_64729607/article/details/122634470</link><guid>https://blog.youkuaiyun.com/m0_64729607/article/details/122634470</guid><author>m0_64729607</author><pubDate>Sat, 22 Jan 2022 23:40:20 +0800</pubDate><description><![CDATA[运用了模块化编程的方式创了一个function头文件


#ifndef __SLEEP_FUNC__
#define __SLEEP_FUNC__
void sleep(unsigned int bs);//耗时半秒
#endif
#ifndef __SMG_FUNC__
#define __SMG_FUNC__
void SMG(int p2,int p0);//数码管显示位置，数字
#endif
#ifndef __JZAJ_FUNC__
#define __JZAJ_FUNC__
int JZ...]]></description><category></category></item><item><title><![CDATA[【Keil5】按键控制LED//普中STC89C5xx-RC Series]]></title><link>https://blog.youkuaiyun.com/m0_64729607/article/details/122618704</link><guid>https://blog.youkuaiyun.com/m0_64729607/article/details/122618704</guid><author>m0_64729607</author><pubDate>Fri, 21 Jan 2022 14:59:36 +0800</pubDate><description><![CDATA[//主要使用P2的8个LED和P3的两个独立按键

按亮松灭


#include &lt;REGX52.H&gt;

void sleep(unsigned int bs)//耗时约半秒
{
	int i,j;
	while(bs--)
	{
		i=2,j=240;
		do
			{
				while(--j);
			}while(--i);
	}
}
int main()
{
	while(1)
	{
		if(P3_3==0)//按k4按键D1灯亮
		{
			sleep(1);//避...]]></description><category></category></item><item><title><![CDATA[【C语言】数据结构与算法第一章//求素数、阶乘、等差数列、一元二次方程]]></title><link>https://blog.youkuaiyun.com/m0_64729607/article/details/122545146</link><guid>https://blog.youkuaiyun.com/m0_64729607/article/details/122545146</guid><author>m0_64729607</author><pubDate>Mon, 17 Jan 2022 19:30:55 +0800</pubDate><description><![CDATA[#include&lt;stdio.h&gt;
#include&lt;math.h&gt; 
/*判断是否为素数*/
int main() 
{
	int n;
	scanf("%d",&amp;n);
	int determine(int );
	if(!determine(n))
	printf("%d不是素数",n);
	else printf("%d是素数",n);
	return 0;
}
int determine(int n)
{
	int i;
	for(i=2;i&lt;=sqr...]]></description><category></category></item><item><title><![CDATA[【C语言】文件 //相关综合应用 单个字符的转换和存储、fscanf与fprintf、优化算法、结构体应用中的scanf与fprintf的区分]]></title><link>https://blog.youkuaiyun.com/m0_64729607/article/details/122526159</link><guid>https://blog.youkuaiyun.com/m0_64729607/article/details/122526159</guid><author>m0_64729607</author><pubDate>Sun, 16 Jan 2022 20:46:09 +0800</pubDate><description><![CDATA[小写字母转成大写，并保存到文本文件中


#include&lt;stdio.h&gt;
int main()
{
	FILE *fp;char ch;
	if((fp=fopen("text.txt","w"))==NULL)
	{
		printf("cannot open!");
	}
	while((ch=getchar())!='0')
	{
		if(ch&gt;='A'&amp;&amp;ch&lt;='Z')
		fprintf(fp,"%c",ch);
		if(ch&gt;='a'&a.]]></description><category></category></item><item><title><![CDATA[【C语言】练习fread和fwrite//并用链表存储高分学生信息]]></title><link>https://blog.youkuaiyun.com/m0_64729607/article/details/122515193</link><guid>https://blog.youkuaiyun.com/m0_64729607/article/details/122515193</guid><author>m0_64729607</author><pubDate>Sat, 15 Jan 2022 20:27:26 +0800</pubDate><description><![CDATA[fwrite是二进制方式写入，写入后的文件不是文本格式，不能用文本编辑器打开，只有纯文本文件才能用记事本打开，这是二进制文件 。




#include&lt;stdio.h&gt; 
#include&lt;stdlib.h&gt;
#define N 10
/*求最高分学生*/ 
typedef struct student
{
	int num;
	char name[10];
	char sex;
	float score;
	struct student *next;
}STU;
int ma.]]></description><category></category></item><item><title><![CDATA[【C语言】背单词程序//调用外部文件练习]]></title><link>https://blog.youkuaiyun.com/m0_64729607/article/details/122478343</link><guid>https://blog.youkuaiyun.com/m0_64729607/article/details/122478343</guid><author>m0_64729607</author><pubDate>Thu, 13 Jan 2022 17:19:57 +0800</pubDate><description><![CDATA[注意！！Win10记事本默认按UTF编码，但fscanf只能简单读取，所以需要转换格式


#include&lt;stdio.h&gt;
#include&lt;stdlib.h&gt;
#include&lt;Windows.h&gt;
#include&lt;string.h&gt;
#define N 3
int cmpcns(const char *p,const char *b)// 判断输入中文是否正确 (母串子串) 
{
	int k;
	if(strlen(b)&lt;(strle...]]></description><category></category></item><item><title><![CDATA[C语言【练习结构体指针,指针数组】]]></title><link>https://blog.youkuaiyun.com/m0_64729607/article/details/122233613</link><guid>https://blog.youkuaiyun.com/m0_64729607/article/details/122233613</guid><author>m0_64729607</author><pubDate>Thu, 30 Dec 2021 13:06:06 +0800</pubDate><description><![CDATA[找出最低分数的同学，储存到h指向的结构体数组


#include&lt;stdio.h&gt;
#include&lt;math.h&gt;
#define N 10
#define eps 1e-4
struct stu
{
	double num;
	float score;
};
int main() 
{
	struct stu s[N],low[N],*Q=s,*h=low;
	int i;float min=100.0; 
	for(i=0;i&lt;N;i++)
	{
		scanf("%.]]></description><category></category></item><item><title><![CDATA[Matlab-Mupad【绘图，列表】]]></title><link>https://blog.youkuaiyun.com/m0_64729607/article/details/122125151</link><guid>https://blog.youkuaiyun.com/m0_64729607/article/details/122125151</guid><author>m0_64729607</author><pubDate>Fri, 24 Dec 2021 12:29:04 +0800</pubDate><description><![CDATA[用mupad绘制余弦和正割函数图像


//s接收cos(x)-sec(x)=0时的解
s:=solve(cos(x)-sec(x),x=-2*PI..2*PI);
//p接收图像的交点
p:=[[s[i],cos(s[i])]$i=1..5];
//画图，cosx的图像用虚线显示
plot(plot::Function2d(cos(x),x=-2*PI..2*PI,LineStyle=Dashed),
plot::Function2d(sec(x),x=-2*PI..2*PI),
//图像中显示文字
p.]]></description><category></category></item><item><title><![CDATA[C语言【结构体中运用指针数组，函数练习】]]></title><link>https://blog.youkuaiyun.com/m0_64729607/article/details/122104816</link><guid>https://blog.youkuaiyun.com/m0_64729607/article/details/122104816</guid><author>m0_64729607</author><pubDate>Thu, 23 Dec 2021 13:17:12 +0800</pubDate><description><![CDATA[#include&lt;stdio.h&gt;
struct student
{
	int num;
	char name[8];
	char sex;
	int age;
	double grade;
};
int i,j;
int main() 
{
	struct student *stu[10],input[10],temp;
	void  inputdata();
	inputdata(stu,input,temp);
	void  outputdata();
	outputdata(stu);.]]></description><category></category></item><item><title><![CDATA[C语言【结构体练习改进】//尝试使用const修饰结构指针，并把结构体变量定义在函数内，避免影响封装]]></title><link>https://blog.youkuaiyun.com/m0_64729607/article/details/122090449</link><guid>https://blog.youkuaiyun.com/m0_64729607/article/details/122090449</guid><author>m0_64729607</author><pubDate>Wed, 22 Dec 2021 17:10:59 +0800</pubDate><description><![CDATA[//尝试使用const关键词，并把结构体变量定义在函数内，避免影响封装 
#include&lt;stdio.h&gt;
struct score
{
	int chinese;
	int english;
	int math;
};
struct student
{
	double num;
	char name[20];
	struct score subjects; //结构体嵌套
};
int main() 
{
	struct student *p,person[5];
	p=person;
	.]]></description><category></category></item><item><title><![CDATA[C语言【结构体】//结构体变量做函数参数，结构体嵌套]]></title><link>https://blog.youkuaiyun.com/m0_64729607/article/details/122031464</link><guid>https://blog.youkuaiyun.com/m0_64729607/article/details/122031464</guid><author>m0_64729607</author><pubDate>Sun, 19 Dec 2021 22:26:11 +0800</pubDate><description><![CDATA[//结构体变量做函数参数，结构体嵌套
#include&lt;stdio.h&gt;
struct score
{
	int chinese;
	int english;
	int math;
};
struct student
{
	double num;
	char name[20];
	struct score subjects; //结构体嵌套
}person[5];
int main() 
{
	struct student *p;
	p=person;
	int i,j;
	for(i=0;i.]]></description><category></category></item><item><title><![CDATA[C语言【利用指向指针的指针实现字符串排序，结构数组与结构体指针，结构体计算名字出现次数 】]]></title><link>https://blog.youkuaiyun.com/m0_64729607/article/details/122020599</link><guid>https://blog.youkuaiyun.com/m0_64729607/article/details/122020599</guid><author>m0_64729607</author><pubDate>Sun, 19 Dec 2021 11:53:42 +0800</pubDate><description><![CDATA[利用指向指针的指针实现字符串排序






#include&lt;stdio.h&gt;
#include&lt;string.h&gt;
int main()
{
	char *str[]={"C","PROGRAMMING","LANGUAGE"},**p,*temp;
	int n=sizeof(str)/sizeof(str[0]),i,j,k;//计算长度 
	p=str;
	for(i=0;i&lt;n-1;i++)//按从小到大排序，选择排序法 
	{
		k=i;
		for(j=i..]]></description><category></category></item><item><title><![CDATA[C语言【利用行指针实现4*4二维数组转置】]]></title><link>https://blog.youkuaiyun.com/m0_64729607/article/details/122017270</link><guid>https://blog.youkuaiyun.com/m0_64729607/article/details/122017270</guid><author>m0_64729607</author><pubDate>Sat, 18 Dec 2021 22:41:32 +0800</pubDate><description><![CDATA[如果用行指针，最后输出时可以用*(*p+i)//相当于*(*(p+0)+i)

如果用普通指针，最后输出可以用*(p+i)

//行指针 取两次地址，所以定位的时候直接p=a;




#include&lt;stdio.h&gt;
int main()
{
	int a[4][4]=
	{
		{1,2,3,4},
		{5,6,7,8},
		{9,10,11,12},
		{13,14,15,16}
	};
	int (*p)[4],temp,i,j;
	p=a;
	for(i=0;i&lt;4;..]]></description><category></category></item><item><title><![CDATA[C语言【关于函数返回地址的二三事】]]></title><link>https://blog.youkuaiyun.com/m0_64729607/article/details/122014578</link><guid>https://blog.youkuaiyun.com/m0_64729607/article/details/122014578</guid><author>m0_64729607</author><pubDate>Sat, 18 Dec 2021 17:44:31 +0800</pubDate><description><![CDATA[关于指针数组



关于字符型数组



关于字符型指针




#include&lt;stdio.h&gt;
#include&lt;stdlib.h&gt; 
int main()
{
	int i;
	char *Dayname();
	char *str=Dayname();
	printf("%s\n",str);
	return 0;
} 
/*char *Dayname(int n)
{
	char *name[]={"illegalday","mon","tue","wed","th...]]></description><category></category></item></channel></rss>