张赐荣——一位视障程序员。
赐荣小站: www.prc.cx

張賜榮

张赐荣的技术博客

博客园 首页 新随笔 联系 订阅 管理
  90 随笔 :: 27 文章 :: 2 评论 :: 76699 阅读

03 2022 档案

摘要:// 用泛型委托实现对象的自定义比较。 using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Runtime.InteropServices; using Sy 阅读全文
posted @ 2022-03-31 22:42 张赐荣 阅读(412) 评论(0) 推荐(0) 编辑

摘要:C# 使用辗转相除法计算两数的最大公因数及最小公倍数 using System; namespace Program { static class Program { static int Main(string[] args) { int x = 42, y = 12; while (x!=y) 阅读全文
posted @ 2022-03-21 19:46 张赐荣 阅读(262) 评论(0) 推荐(0) 编辑

摘要:C语言循环求阶乘 #include<iostream> long factorial(int n); int main(int cmd_length, char ** cmd_args) { printf("%d\n",factorial(9)); return(0); } long factori 阅读全文
posted @ 2022-03-21 19:39 张赐荣 阅读(209) 评论(0) 推荐(0) 编辑

摘要:C语言 分别用链表、数组两种方式实现队列存储结构 用链表实现队列 // 队列是先进先出的一种数据存储结构,本例中实现了入队出队便利及清空。 #include <stdio.h> #include <malloc.h> #define NULL 0 typedef struct node { int 阅读全文
posted @ 2022-03-21 19:36 张赐荣 阅读(282) 评论(0) 推荐(0) 编辑

摘要:C语言 实现链表 链表概念 链表是一种物理存储单元上非连续、非顺序的存储结构,数据元素的逻辑顺序是通过链表中的指针链接次序实现的。 链表由一系列结点(链表中每一个元素称为结点)组成,结点可以在运行时动态生成。 每个结点包括两个部分:一个是存储数据元素的数据域,另一个是存储下一个结点地址的指针域。 相 阅读全文
posted @ 2022-03-21 16:36 张赐荣 阅读(113) 评论(0) 推荐(0) 编辑

摘要:栈 Stack 介绍 栈(stack)又名堆栈,它是一种运算受限的线性表。限定仅在表尾进行插入和删除操作的线性表。这一端被称为栈顶,相对地,把另一端称为栈底。 向一个栈插入新元素又称作进栈、入栈或压栈,它是把新元素放到栈顶元素的上面,使之成为新的栈顶元素; 从一个栈删除元素又称作出栈或退栈,它是把栈 阅读全文
posted @ 2022-03-21 16:26 张赐荣 阅读(124) 评论(0) 推荐(0) 编辑

摘要:用C语言实现从1+2+3+n+100 #include <stdio.h> int plus(int); int main(void) { int n = 0; n = plus(n); printf("%d\n",n); return 0; } int plus(int n) { return n 阅读全文
posted @ 2022-03-21 16:23 张赐荣 阅读(149) 评论(0) 推荐(0) 编辑

摘要:test1.c //error #include <stdio.h> int main(void) { int i = 5; const int *p = &i; printf("%d\n",*p); *p = 10; printf("%d\n",*p); return 0; } test2.c / 阅读全文
posted @ 2022-03-21 16:17 张赐荣 阅读(56) 评论(0) 推荐(0) 编辑

摘要:定义基本类型的别名 #include <stdio.h> typedef int Integer; int main(void) { Integer a = 5,b = 10; printf("%d\n",a+b); return 0; } /* typedef不是必须声明在函数外,也可以声明在一个 阅读全文
posted @ 2022-03-21 16:11 张赐荣 阅读(245) 评论(0) 推荐(0) 编辑

摘要:#include <stdio.h> #include <malloc.h> int *LoadInt(int); int main(void) { int x = 0; int *p; p = LoadInt(20); while(x < 20) { printf("%d\n",p[x]); x+ 阅读全文
posted @ 2022-03-21 16:08 张赐荣 阅读(101) 评论(0) 推荐(0) 编辑

摘要:指向无参函数的指针 #include <stdio.h> int Integer(void); char Char(void); int main(void) { int (*a)() = Integer; char (*b)() = Char;; printf("%d\n%c\n",a(),b() 阅读全文
posted @ 2022-03-21 16:04 张赐荣 阅读(113) 评论(0) 推荐(0) 编辑

摘要:用指针作形参,实现输出参数,交换两变量的值。 #include <stdio.h> void jiaohuan(int *,int *); int main(void) { int a=100,b=200; jiaohuan(&a,&b); printf("%d\n%d\n",a,b); retur 阅读全文
posted @ 2022-03-21 16:01 张赐荣 阅读(126) 评论(0) 推荐(0) 编辑

摘要:C语言多级指针 (指向指针的指针) #include <stdio.h> int main(void) { int i = 100,j = 200; int *p; int **q; int ***l; p = &i; q = &p; l = &q; printf("%d\n%d\n%d\n%d\n 阅读全文
posted @ 2022-03-21 15:58 张赐荣 阅读(31) 评论(0) 推荐(0) 编辑

摘要:C语言 enum 枚举常量 #include <stdio.h> enum WeekDay { MonDay,TuesDay,WednesDay = 5,ThursDay,FriDay,SaturDay,SunDay }; int main(void) { enum WeekDay Day = Fr 阅读全文
posted @ 2022-03-21 15:56 张赐荣 阅读(66) 评论(0) 推荐(0) 编辑

摘要:C语言共用体 union #include <stdio.h> union U1 { unsigned char c [3];unsigned int i; }; union U2 { char c[15]; int i; }; int main(void) { union U1 u1; union 阅读全文
posted @ 2022-03-21 15:52 张赐荣 阅读(198) 评论(0) 推荐(0) 编辑

摘要:C语言使用指针指向结构体 #include <stdio.h> struct Student { char name; int age; }; int main(void) { struct Student a,*p; p = &a; p->name = 'a'; p->age = 12; prin 阅读全文
posted @ 2022-03-21 15:49 张赐荣 阅读(52) 评论(0) 推荐(0) 编辑

摘要:C语言结构体类型 #include <stdio.h> struct Student { char name; int age; }; int main(void) { struct Student a = {'a',12};; printf("name:%c\nage:%d\n",a.name,a 阅读全文
posted @ 2022-03-21 15:43 张赐荣 阅读(58) 评论(0) 推荐(0) 编辑

摘要:C语言前自增自减(c、--c)和后自增自减(c、c--)的区别? #include <stdio.h> int main(void) { int i = 5; i++; printf("%d\n",i); printf("%d\n",i++); printf("%d\n",i); printf("% 阅读全文
posted @ 2022-03-21 15:40 张赐荣 阅读(179) 评论(0) 推荐(0) 编辑

摘要:C语言基本数据类型的意义,如何灵活运用? #include <stdio.h> int main(void) { int i = 1094795585; //该值占四个字节,每个字节都是十进制的六十五 char *p = (char *)&i; printf("%d\n%d\n%d\n%d\n",p 阅读全文
posted @ 2022-03-21 15:35 张赐荣 阅读(120) 评论(0) 推荐(0) 编辑

摘要:键盘 键盘是计算机的主要输入设备之一,中文汉字、英文字母、数字以及标点符号就是通过键盘输入计算机的。不同的击键和击键序列代表了您将要计算机准备执行的不同命令,我们只要通过敲击键盘上面的不同键位,输入不同的指令,计算机就会根据你的指令去完成各项工作。键盘的款式有很多种,我们通常使用的有101键、104 阅读全文
posted @ 2022-03-21 10:16 张赐荣 阅读(4954) 评论(0) 推荐(0) 编辑

摘要:Windows 常用标准控件介绍 1.窗口框架(Window),它是屏幕上与一个应用程序相对应的矩形区域,包括框架和客户区,是用户与产生该窗口的应用程序之间的可视界面,它通常包含子对象,例如,窗口中通常包含的标题栏、菜单栏、客户端和其他对象 2.对话框(Dialog),对话框或消息框,属于特殊的窗口 阅读全文
posted @ 2022-03-19 21:22 张赐荣 阅读(1513) 评论(0) 推荐(0) 编辑

感谢访问张赐荣的技术分享博客!
博客地址:https://cnblogs.com/netlog/
知乎主页:https://www.zhihu.com/people/tzujung-chang
个人网站:https://prc.cx/

点击右上角即可分享
微信分享提示