消息队列 消息队列即消息的链表,存放于内核并由消息队列标识符表示。是Linux进程通信机制中常见的一种通信方式,常用来在不同进程间发送特定格式的信息数据。linux支持POSIX消息队列与System V消息队列,本文阐述后者,详可见:https://www.cnblogs.com/linuxbug ...
分类:
系统相关 时间:
2019-12-29 16:39:19
阅读次数:
116
1.冒泡排序 1 #include <stdio.h> 2 int main(){ 3 int i,j,n,temp; 4 int a[100]; 5 while(scanf("%d",&n)!=EOF){ 6 for(int i=0;i<n;i++){ 7 scanf("%d",&a[i]); 8 ...
分类:
其他好文 时间:
2019-12-29 15:05:44
阅读次数:
73
1. #include <stdio.h> #include <stdlib.h> #include <string.h> const int N = 10; // 定义结构体类型struct student,并定义其别名为STU typedef struct student { long int ...
分类:
其他好文 时间:
2019-12-29 13:02:42
阅读次数:
64
#include <stdio.h> #include <stdlib.h> #include <string.h> const int N = 10; // 定义结构体类型struct student,并定义其别名为STU typedef struct student { long int id; ...
分类:
其他好文 时间:
2019-12-29 12:43:35
阅读次数:
47
一、学习 1.在命令行中输入 进行查看 2.在命令行中输入 进行查看 二、伪代码 1.指定文件名filename; 2.定义stat结构体,调用stat()函数,将filename中的信息储存再stat结构体中; 3.用原点标记符得到stat中的属性,并用printf将其输出。 三、产品代码 四、运 ...
分类:
其他好文 时间:
2019-12-29 11:23:15
阅读次数:
81
具体看实例: 1 #include <iostream> 2 using namespace std; 3 //定义一个第一人称游戏的人物角色的结构体 4 struct NPC { 5 char Name[20]; 6 int age; 7 bool sex;//男=0,女=1 8 }; 9 int ...
分类:
其他好文 时间:
2019-12-29 11:01:55
阅读次数:
74
part1:正确 文本文件可以看,二进制文件看不懂。 part2: #include <stdio.h> #include <stdlib.h> #include <string.h> const int N = 10; // 定义结构体类型struct student,并定义其别名为STU typ ...
分类:
其他好文 时间:
2019-12-29 10:45:40
阅读次数:
57
为什么C语言函数可以返回结构体,却不可以返回数组?有这样的问题并不奇怪,因为C语言数组和结构体本质上都是管理一块内存,那为何编译器要区别对待二者呢? C语言函数为什么不能返回数组? 在C语言程序开发中,我们不可以编写下面这样的代码: char f(void)[8] { char ret; // .. ...
分类:
编程语言 时间:
2019-12-28 23:03:41
阅读次数:
91
Part 1.1 验证性实验2修改 // 从文本文件file1.dat中读取数据,找出最高分和最低分学生信息,并输出在屏幕上 #include <stdio.h> #include <stdlib.h> #define N 10 // 定义一个结构体类型STU typedef struct stud ...
分类:
其他好文 时间:
2019-12-28 22:36:05
阅读次数:
89
转自:https://www.cnblogs.com/51try-again/p/11099999.html 一、引用计数 1、变量与对象 变量赋值的时候才创建,它可以指向(引用)任何类型的对象 python里每一个东西都是对象,它们的核心就是一个结构体:PyObject 变量必须先赋值,再引用。 ...
分类:
编程语言 时间:
2019-12-28 22:32:11
阅读次数:
92