捏外帅爷
码龄10年
关注
提问 私信
  • 博客:43,172
    43,172
    总访问量
  • 26
    原创
  • 919,729
    排名
  • 9
    粉丝
  • 0
    铁粉
IP属地以运营商信息为准,境内显示到省(区、市),境外显示到国家(地区)
IP 属地:山西省
  • 加入CSDN时间: 2015-01-15
博客简介:

雍和

博客描述:
一个IT小白
查看详细资料
个人成就
  • 获得29次点赞
  • 内容获得1次评论
  • 获得28次收藏
创作历程
  • 26篇
    2018年
成就勋章
创作活动更多

2024 博客之星年度评选报名已开启

博主的专属年度盛宴,一年仅有一次!MAC mini、大疆无人机、华为手表等精美奖品等你来拿!

去参加
  • 最近
  • 文章
  • 代码仓
  • 资源
  • 问答
  • 帖子
  • 视频
  • 课程
  • 关注/订阅/互动
  • 收藏
搜TA的内容
搜索 取消

C语言项目开发字符串模型

strstr-whiledowhile模型#include<stdio.h>int main(void){    int count=0;    char*p="abc1525111abcjoidsdjsabcjeodedjabc";   /* do    {        p=strstr(p,"5");        if(p!=NULL)        {            ...
原创
发布博客 2018.04.15 ·
264 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

C语言字符串拷贝经典

两种方法#include<stdio.h>/*int main(void){    char a[]="i am a student";    char b[64];    int i=0;    for(i=0;*(a+i)!= '\0';i++)    {        *(b+i)=*(a+i);        printf("%c",b[i]);    }    b[i]='\...
原创
发布博客 2018.04.13 ·
3928 阅读 ·
2 点赞 ·
0 评论 ·
2 收藏

C语言用字符串来初始化字符数组

#include<stdio.h>int main(void){    int size;    char buf[]="abcd";//作为字符数组应该是五个字节(\o),作为字符串是四个字节    int len=strlen(buf);//长度,不包括0    printf("%d
",len);    size=sizeof(buf);//内存块大小    printf("%...
原创
发布博客 2018.04.13 ·
2500 阅读 ·
1 点赞 ·
0 评论 ·
0 收藏

栈开口方向的判断

不管栈开口方向向上还是向下,内存地址加一永远向上#include<stdio.h>int main(void){    int a;    int b;    printf("%d   %d
",&a,&b);    if(&a>&b)        printf("开口向下
");    else        printf("开口向上
&quo
原创
发布博客 2018.04.11 ·
2910 阅读 ·
0 点赞 ·
0 评论 ·
1 收藏

数据结构快速排序演示

#include<stdio.h>int FindPos(int *a,int low,int high);QuickSort(int *a,int low,int high);int main(void){    int i;    int a[6]={2,1,0,5,4,3};    QuickSort(a,0,5);//第二个参数表示第一个元素的下标,第三个元素表示最后一个元素的...
原创
发布博客 2018.04.02 ·
340 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

数据结构链式二叉树的先中后序遍历

#include<stdio.h>#include<malloc.h>struct BTNode{    char data;    struct BTNode * pLchild;//pLchild左孩子    struct BTNode * pRchild;//pRchild右孩子};struct BTNode *CreateBTree(void);void PreTr...
原创
发布博客 2018.04.01 ·
202 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

数据结构汉诺塔演示

#include<stdio.h>void hnt(int n,char A,char B,char C){    /*    如果是1个盘子        直接将A柱子上的盘子从A移到C    否则        先将A柱子上的n-1个盘子借助C移到B        直接将A柱子上的盘子从A移到C        最后将B柱子上的n-1个盘子借助A移到C    */    if(1==...
原创
发布博客 2018.03.30 ·
645 阅读 ·
0 点赞 ·
0 评论 ·
1 收藏

数据结构用递归求1到某个数的和

#include<stdio.h>long f(long n){    if(1==n)        return 1;    else        return f(n-1)+n;}int main(void){    int k;    printf("请输入要求的值
");    printf("k=");    scanf("%d",&k);    printf(...
原创
发布博客 2018.03.29 ·
329 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

数据结构用递归求阶乘

#include<stdio.h>long f(long n){    if(1==n)        return 1;    else        return f(n-1)*n;}int main(void){    int k;    printf("请输入要求的值
");    printf("k=");    scanf("%d",&k);    printf(...
原创
发布博客 2018.03.29 ·
1116 阅读 ·
1 点赞 ·
0 评论 ·
1 收藏

数据结构循环队列演示程序

#include<stdio.h>#include <stdbool.h>#include<malloc.h>typedef struct queue{    int *pBase;    int front;    int rear;}QUEUE;void init(QUEUE *);bool en_queue(QUEUE *,int val);//入队boo...
原创
发布博客 2018.03.29 ·
232 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

数据结构栈程序演示(相当于一个操作受限的链表)

#include<stdio.h>#include<malloc.h>#include<stdlib.h>#include <stdbool.h>//bool所需头文件typedef struct Node{    int data;    struct Node*pNext;}NODE,*PNODE;typedef struct stack{   ...
原创
发布博客 2018.03.24 ·
168 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

数据结构链表创建,遍历,是否为空,求长度,插入,删除算法的演示

#include<stdio.h>#include<malloc.h>#include<stdlib.h>#include <stdbool.h>       /*bool类型需要的头文件*/typedef  struct  Node{    int data;/*数据域*/    struct  Node *pNext;/*指针域*/} NODE,...
原创
发布博客 2018.03.19 ·
322 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

数据结构跨函数使用内存

#include<stdio.h>#include<malloc.h> struct Student {     int sid;     int age; };  struct Student  * CreatStudent(void);  void  ShowStudent(struct Student *);int main (void){    struct Stu...
原创
发布博客 2018.03.15 ·
222 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

C语言枚举例子

#include<stdio.h>enum weekday{    A,B,C,D,E,F,G};int main(void){    enum  weekday   day =A;    printf("%d",day+1);    return 0;}
原创
发布博客 2018.03.13 ·
3584 阅读 ·
2 点赞 ·
0 评论 ·
2 收藏

C语言动态构造学生信息管理系统

存在的问题是动态构造的空间无法使用#include<stdio.h>#include<malloc.h>struct student{    int age;    char score;    char name[100];};int main(void){    struct student*parr;    struct student t;    int i, j,...
原创
发布博客 2018.03.12 ·
641 阅读 ·
0 点赞 ·
0 评论 ·
1 收藏

C语言冒泡排序

#include<stdio.h>void  s (int *a,int len){    int i,j,t;    for(i=0;i<len-1;i++)       {              for(j=0;j<len-1-i;j++)              {                  if(a[j]>a[j+1])             ...
原创
发布博客 2018.03.12 ·
149 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

C语言动态一维数组的构造

#include<stdio.h>#include<malloc.h>int main (void){    int len;    int*p;    int i;    printf("请输入数组长度
");    scanf("%d",&len);    p=(int*)malloc(4*len);    printf("请输入要赋的值
");    fo...
原创
发布博客 2018.03.11 ·
1519 阅读 ·
1 点赞 ·
0 评论 ·
1 收藏

C语言malloc函数用法

#include<stdio.h>#include<malloc.h>void f(int *q){    *q=200;}int main (void){    int*p=(int*)malloc(sizeof(int));    *p=10;    printf("%d
",*p);    f(p);    printf("%d
",*p);    return ...
原创
发布博客 2018.03.11 ·
2308 阅读 ·
1 点赞 ·
0 评论 ·
0 收藏

C语言如何输出数组内容以及指针相关知识

#include<stdio.h>void  f(int *p,int  len){    int i;    for(i=0;i<len;i++)        printf("%d",*(p+i));    printf("
");}int main (void){    int a[5]={1,2,3,4,5};    int b[4]={8,5,2,4};    int...
原创
发布博客 2018.03.10 ·
2496 阅读 ·
0 点赞 ·
0 评论 ·
2 收藏

C语言用指针互换两个数字

#include<stdio.h>void change(int *p , int *q){    int t;     t=*p;    *p=*q;    *q=t;}int main(void){    int a=3;    int b=5;    change(&a,&b);    printf("%d
%d",a,b);    return 0;}...
原创
发布博客 2018.03.09 ·
2889 阅读 ·
2 点赞 ·
0 评论 ·
3 收藏
加载更多