C/C++
C/C++语言
I like study.
热爱技术
展开
-
如何在linux下编译运行c程序
1.在终端下打开一个编辑器(我用的gedit),建立一个hello.c文件并保存,2.关闭编辑器,在终端上输入 gcc -o hello hello.c编译c程序3.输入./hello运行c程序原创 2018-10-17 18:32:58 · 38591 阅读 · 2 评论 -
链队列基本操作实现(c语言)
#include <stdio.h>#include <stdlib.h>typedef int ElemType;typedef struct{ ElemType data; struct node*next;} linkQNode;typedef struct qnode{ linkQNode* rear; linkQ原创 2018-12-18 09:31:34 · 2647 阅读 · 0 评论 -
队列(顺序表)基本操作实现(c语言)
#include <stdio.h>#include <stdlib.h>#define MAX_SIZE 100typedef int ElemType;typedef struct node{ int front; int rear; ElemType data[MAX_SIZE];}*queueList,queueNode;//顺序...原创 2018-12-18 09:30:42 · 1815 阅读 · 0 评论 -
链栈基本操作实现(c语言)
#include <stdio.h>#include <stdlib.h>typedef int ElemType;typedef struct node{ ElemType data; struct node*next;}*linkStack,stackNode;//链栈初始化linkStack initLinkStack(){原创 2018-12-17 18:16:50 · 5096 阅读 · 0 评论 -
顺序栈基本操作实现(c语言)
#include <stdio.h>#include <stdlib.h>#define MAX_SIZE 100typedef int ElemType;typedef struct node{ ElemType data[MAX_SIZE+1]; int top;}*seqStack,stackNode;/原创 2018-12-17 18:15:23 · 349 阅读 · 0 评论 -
链表基本操作实现(c语言)
#include <stdio.h>#include <stdlib.h>typedef int ElemType;typedef struct node{ ElemType data; struct node*next;}*linkList,linkNode;//链表初始化linkList initLinkList(){ lin...原创 2018-12-17 16:45:55 · 530 阅读 · 0 评论 -
顺序表基本操作实现(c语言)
#include <stdio.h>#include <stdlib.h>#include <conio.h>#define MAX_SIZE 100typedef int ElemType;typedef struct node{ ElemType data[MAX_SIZE+1]; int length;}*seqList原创 2018-12-17 16:44:29 · 275 阅读 · 0 评论 -
六种排序算法(插入排序、希尔排序、冒泡排序、快速排序、选择排序、堆排序)
#include <stdio.h>#include <stdlib.h>#include <conio.h>#define MAX_NUM 32768typedef int ElemType;//元素类型typedef struct{ ElemType key;} KeyType;//关键字的类型typedef struct原创 2018-12-10 17:37:42 · 2421 阅读 · 3 评论 -
双向循环链表实现(c语言)
#include <stdio.h>#include <stdlib.h>typedef int ElemType;typedef struct node{ ElemType data; struct node*next; struct node*rear;}*linkList,linkNode;//链表初始化linkList in...原创 2018-12-20 09:44:41 · 5265 阅读 · 0 评论 -
串的基本操作(c语言)
#include <stdio.h>#include <stdlib.h>#define MAX_NUM 100typedef struct str{ char ch[MAX_NUM+1]; int length;}*SString;//字符串初始化SString initSString(){ SString str=(SStr...原创 2018-12-20 09:43:07 · 16120 阅读 · 7 评论 -
二分查找
#include <stdio.h>#include <stdlib.h>#define MAX_NUM 100typedef struct{ int key;}ElemKey;typedef struct sequence{ int elem[MAX_NUM]; int length;}sqList;sqList* init_sqLi...原创 2018-11-25 13:27:24 · 149 阅读 · 0 评论 -
哈希表操作
#include <stdio.h>#include <stdlib.h>#include <conio.h>#define HASHTABLE_LINE 1000typedef int ElemType;typedef struct hashNode{ ElemType site; ElemType key; struct...原创 2018-11-25 13:22:17 · 230 阅读 · 0 评论 -
windows环境下通过命令行编译运行c程序
一 前言 之前都是在编译器运行的,刚开始学c时老师讲了怎么在cmd运行c程序,当时没听懂,最近学了linux对c语言下运行c程序,对于c语言的编译运行过程有了更深的了解,所以尝试了windows cmd下运行c程序,其实原理都是一样的,只是方法不同而已。二 步骤打开命令行(cmd)先切换到当前要编译的目录下(不切换也可以,只不过要全写路径)d:然后输入一下命令E:\CodeBl...原创 2019-04-20 10:17:18 · 7009 阅读 · 0 评论
分享