自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(11)
  • 收藏
  • 关注

原创 IDEA自定义注释模版(方法参数会换行)

Idea中配置方法注释模板

2022-10-18 17:29:50 656 1

原创 简章链表实现

list.h#include <stdio.h>#include<stdlib.h>typedef struct student { int num; float score; struct student *pNextStu;}student_t,*pStudent_t;//链表头插法方法的声明void ListHeadInsert(pStudent_t* pphead, pStudent_t * pptail, int val);//链表尾插法方法的声明v

2021-03-17 15:06:09 92

原创 共用体与枚举

共用体使几个不同的变量共占一段内存的结构称为“共用体”类型的结构。共用体变量所占的内存长度等于最长的成员的长度union 共用体名{成员列表}变量列表;#include <stdio.h>#include <stdlib.h>union data { int i; char c; float f;};typedef struct Student { int num; float score;}student_t;int main() { uni

2021-03-15 08:31:12 110

原创 C语言-结构体与结构指针

结构体的定义-引用-初始化声明一个结构体类型的一般形式为struct 结构体名{成员列表};如: struct student { int num; char name[20]; char sex; int age; float score; char addr[30]; }; struct student student1, student2;先声明结构体类型再定义变量名,例如:struct student student1, student2;...

2021-03-12 09:49:44 218

原创 C语言之字符串翻转

# include<stdio.h># include<stdlib.h># include<string.h>void wordReverse(char *start,char * end) { char tmp; while (start<end) { tmp = *start; *start = *end; *end = tmp; start++; end--; }}int main() { char str[1000].

2021-03-11 21:46:49 267

原创 C语言之指针

指针与自增、自减运算符# include<stdio.h># include<stdlib.h># include<string.h>//只有比后增优先级高的操作符,才会作为一个整体,如()、[]int main() { int a[3] = { 2,7,8 }; int *p; int j; p = a; j = *p++;//先把*p的值赋给j,然后对p加1,p为指针变量 printf("a[0]=%d,j=%d,*p=%d\n",a[0],j

2021-03-10 16:43:19 1121

原创 C语言之循环打印的相关题目

打印下面图形# include<stdio.h># include<stdlib.h># include<string.h>//打印下列图形// *// * *// * * *// * * * *// * * * * *// * * * *// * * *// * *// *int main() { int i; for (i = 0; i < 9;++i) { int .

2021-03-10 14:41:10 220

原创 C语言之数组

一维数组声明数组时要遵循以下规则1.数组名的命令规则和变量名的相同,即遵循标识符命名规则。2.在定义数组时,需要指定数组中元素的个数,方括号中的常量表达式用来表示元素的个数,即数组长度。3.常量表达中可以包含常量和符号常量,但不能包含变量。也就是说,C语言不允许对数组的大小做动态定义,即数组的大小依赖于程序运行过程中变量的值。一维数组的存储及函数传递# include<stdlib.h># include<stdio.h>//一维数组的传递,数组长度无法传递给子函数

2021-03-09 19:34:39 3938

原创 C语言之选择与循环练习

1、编写程序,输入年、月、日,输出该日期是当年的第几天。2、编写程序,输入两个日期(年、月、日,年、月、日),输出这两个日期之间相隔多少天。3、编写程序,输入一个日期,输出该日期是周几。提示:a.days % 7 b.(7-days%7)%7...

2021-03-08 22:39:36 103

原创 有关异或的题目

有关异或的题目1.有101个整数,其中有50个数出现了两次,1个数出现了1次,找出出现了一次的那个数。异或:相同数字得到0,任何数与零异或,最终得到自身,同时异或满足交换律。# include<stdlib.h># include<stdio.h>int main() { int a[13] = { 1,2,3,4,5,6,17,1,2,3,4,5,6 }; int result = 0; for (int j = 0; j <= sizeof(a)/4

2021-03-08 20:29:04 511

原创 C语言学习

跟龙哥学C语言进制转换将十进制转换成二进制。输入十进制数,输出对应的二进制数,按组合键Ctrl+Z结束# include<stdlib.h># include<stdio.h>#define N 2int main() { int m, r; int binary[50]; int decimal; while (scanf("%d", &decimal) != EOF) { int i = 0; m = decimal; while (m/N!=

2021-03-08 17:33:51 138

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除